I am wondering if it would be possible to make the "control" function more efficient.
The reason why I am asking is because I have tried to solve control for target in two different ways when the control variable is in the same equation as the target endogenous variable:
1) using the control function. It takes 3.1 seconds to solve using this function, see program:
2) manually changing the equation. It takes 0.7 seconds to solve using this approach, see program
the second procedure can be illustrated as follows. consider the equation:
yi = a1*y1+...+an*yn+zi
where yi is the endogenous variable we want to control and zi is the control variable (add-factor). Let yi denote the target for the endognous variable. we can then rewrite the equation above as
0*zi+yi = a1*y1+...+an*yn+zi
and include it in the model object.
we have thus used the following steps
i) made the endogenous variable yi exogenous
ii) defined a target variabel yi
iii) made the control variable zi endogenous
Now the model solves for the control variable zi which yields the desired target yi. Interestingly, this procedure is more than 4 times faster than the built in "control" function.
This leads me to think that you can rewrite the control function in some way to make it more efficient. Is this correct?
ps: you can use the attached program files on the workfile i sent you previously
For technical support, tips and tricks, suggestions, or any other information regarding the EViews model object.
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 7 guests