Hi, I am constructing a FRB/US type semi-structure model and using DYNARE to estimate a PAC equation. PAC_EST.mod (1.9 KB)
However, I found that the iterative OLS method is only applicable with trend_component_model, but it makes a following error with var_model.
Strange thing is that it works perfectly well with nls method.
Error using strfind
Not enough input arguments.
Error in pac.estimate.iterative_ols (line 130)
if isempty(strfind(match.var, ‘(-1)’))
Error in PAC_EST.driver (line 366)
pac.estimate.iterative_ols(‘pac_equation’, eparams, edata, dates(‘2005Q1’):dates(‘2005Q1’)+4000);
Error in dynare (line 281)
Does Dynare provide iterative_ols method only for the trend_component model case?
Of course, I can work with the non-linear least squre method, still this issue lingers on my mind.
Thank you in advance.
This is a bug, thanks for reporting it. I simply forgot to update the iterative OLS routine when I added the possibility to have a constant in the auxiliary model. I have pushed a patch fixing the issue, it will be available in the next minor release. You can have a look at the patch here:
As a general rule, I discourage the use of iterative OLS which is less robust, and doesn’t have (to my knowledge) clear properties about bias and efficiency. Also by construction it will deliver a greater sum of squared residual.
Thank you very much for the update.
I have one more question though.
Where can I find the estimates of the pac_expectation, the infinite sum part?
I presume that Dynare would compute the stationary and nonstationary part of the infinite sum, but I could not find any of them.
I have the impression that we do not save it. Dynare creates an auxiliary variable for the PAC expectation term (named
pacman by the name of your PAC expectation model as declared in your
.mod file). You can see the equation in the JSON generated file. You just have to evaluate the RHS of this equation.