## Solve Control for Target

For technical support, tips and tricks, suggestions, or any other information regarding the EViews model object.

Moderators: EViews Gareth, EViews Moderator

Justinn
Posts: 2
Joined: Wed May 11, 2022 7:04 pm

### Solve Control for Target

I am interested in the Solve Control for Target procedure. However, I've never had luck navigating the error messages and can tell I'm doing something wrong. Is there an example workfile anywhere that I can use just so I can better understand and implement the procedure? Such as the workfile for this- https://eviews.com/EViews12/ev12models_n.html

If not, would someone be able to simulate some data with a working model that successfully demonstrates the procedure? I would be really grateful if so.

Regards,
Justin

EViews Matt
EViews Developer
Posts: 528
Joined: Thu Apr 25, 2013 7:48 pm

### Re: Solve Control for Target

Hello,

Here's a trivial artificial model with an example of using the control procedure over a single variable.

Code: Select all

`wfcreate u 100series inA = 1 + @abs(@sin(@obsid / 25)) / 2 + rnd / 8series inB = rnd * @sin(@obsid / 15)series outmodel mm.append out = inA + inBm.solveseries out_target = out_0smpl 81 100out_target = out_0 * (1 + (@obsid - 80) / 40)smpl @allshow mm.control(create) inA out out_target`

If you share the error message you're encountering I may be able shed some light on what can be done to resolve them. There's quite a variety of errors that could occur, from structural mistakes (e.g. trying to use an exogenous variable to control an endogenous variable that it doesn't influence) to numerical issues (e.g. failing to find control values that satisfy the target series).

Justinn
Posts: 2
Joined: Wed May 11, 2022 7:04 pm

### Re: Solve Control for Target

Matt, thank you very much for the response! This illuminates the procedure for me now that I can follow a worked example.

I tend to encounter this error, "An equal number of control, target, and trajectory variables must be specified." I think part of that is I wasn't understanding the concept of the trajectory variable.

Thanks again,
Justin