%modelpoke
-
Finn Weiss
- Posts: 15
- Joined: Fri Apr 24, 2015 8:48 am
%modelpoke
Hey,
i want to use the function %modelpoke to replace equation i with another equation. But this function does not seem to work correctly.The function changes the equations but it also deletes the i+1 to n-th equations of the model.
So didn't i understand the function or does the function work incorrect?
i want to use the function %modelpoke to replace equation i with another equation. But this function does not seem to work correctly.The function changes the equations but it also deletes the i+1 to n-th equations of the model.
So didn't i understand the function or does the function work incorrect?
Re: %modelpoke
Dear Tom,
after I have replaced an equation in a model with the %modelpoke() function, how do I get the resulting covariance matrix of that model
?
Thanks
Jules
after I have replaced an equation in a model with the %modelpoke() function, how do I get the resulting covariance matrix of that model
?
Thanks
Jules
Re: %modelpoke
Unless it's a known transformation of the existing covariance matrix (due to being a linear transformation of the equations), you would have to recompute the residuals (of all the equations) and use VCV to compute a new covariance matrix. If it's a known transformation, you could do a matrix calculation, but nothing is going to be done automatically.
Re: %modelpoke
Thanks! I have a followup question:
I estimated a model and used in the ESTIMATE instruction the SMPL option with a dummy variable to estimate the model for some regime specific periods, then I replaced the first equation of the model with some other equation:
Then I want to calculate the resudals of that new model, so I did the following:
But then I get this error:
## SR5. Using Range 0 to 0 of Series x1. (Incorrect start,end or SMPL)
So hwo do I get the residuals of the new model where I have replaced the equation, when the residuals should only be calculated for the subset defined above.
Best
Jules
I estimated a model and used in the ESTIMATE instruction the SMPL option with a dummy variable to estimate the model for some regime specific periods, then I replaced the first equation of the model with some other equation:
Code: Select all
estimate(print,smpl=dup,model=sur,title="Upper Regime",resid=resup) rstart rend
compute %modelpoke(sur,1,%modeleqn(exovar,1))
Code: Select all
smpl(series =(dup>0))
forecast(model=sur,errors=resup,static)
## SR5. Using Range 0 to 0 of Series x1. (Incorrect start,end or SMPL)
So hwo do I get the residuals of the new model where I have replaced the equation, when the residuals should only be calculated for the subset defined above.
Best
Jules
Re: %modelpoke
SMPL options don't apply to FORECAST---you can always ignore forecasts that you don't want. It will take the overall range off the SMPL instruction, but you should probably just use FROM and TO options on the FORECAST instruction instead.