Hi Dynare community,
I am trying to use Dynare to estimate a SOE model for Australia as published in the AER Volume 42 Issue 1, Pages 24  41 “A structural Model of Australia as a Small Open Economy”
I have specified the loglinerised equations and priors as per the paper but when I try to estimate the model I obtain the following error.
??? Error using ==> print_info at 39
Blanchard Kahn conditions are not satisfied: no stable equilibrium
Error in ==> initial_estimation_checks at 101
print_info(info, options_.noprint)
Error in ==> dynare_estimation_1 at 334
initial_estimation_checks(xparam1,gend,data,data_index,number_of_observations,no_more_missing_observations);
Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});
Error in ==> SmallOEDSGE_Estim at 393
dynare_estimation(var_list_);
Error in ==> dynare at 132
evalin(‘base’,fname) ;
I have read the forum posts adressing BK conditions but still cannot seem to ammend the mod file to get it working.
This is a crucial step in my honors research essay and I am starting to panic that it might never work. I am somewhat new to Dynare and would really appreciate the help of the experienced Dynare community so I can learn what my mistake might be.
I have attached the paper, my mod file, and the data I am loading for those kind enough to have a look at my issue.
(2007) Nimark  Australia Small Open Economy DSGE.pdf (256 KB)
SmallOEDSGE_RBA.m (9.45 KB)
SmallOEDSGE_Estim.mod (6.15 KB)
Today I ran a Simulation file (attached) of the same model and got the following warning followed by output containing a fair few NaN’s
…
There are 4 eigenvalue(s) larger than 1 in modulus
for 4 forwardlooking variable(s)
There are 4 eigenvalue(s) larger than 1 in modulus
for 4 forwardlooking variable(s)
The rank condition is verified.
**Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 2.576815e036. **
In dr1 at 396
In resol at 128
In stoch_simul at 42
In SmallOEDSGE_Sim at 296
In dynare at 132
Warning: Matrix is singular to working precision.
In dr1 at 407
In resol at 128
In stoch_simul at 42
In SmallOEDSGE_Sim at 296
In dynare at 132
MODEL SUMMARY
Number of variables: 27
Number of stochastic shocks: 11
Number of state variables: 18
Number of jumpers: 4
Number of static variables: 9
MATRIX OF COVARIANCE OF EXOGENOUS SHOCKS…
I think this may be related to the instability when i try to estimate the model. However I am still unsure what might be causing the error or what the remedy might be.
I hope someone out there in the Dynare community can come to my rescue.
SmallOEDSGE_Sim.mod (4.4 KB)
Thanks for taking the time to look at my issue and post a comprehensive reply.
I hate to be a pest, but I ran the mod file you put up I got the same error as I pasted in my original query.
Was there something else I had to do? Or possibly different versions of Dynare? (I am running 4.1.2) Or perhaps i misunderstood one of the steps you outlined?
Thanks again for your support
Hi, in the version I posted, I only corrected the model. However, your prior specification was still incorrect (see the Dynare manual).
 You did not specify any starting values. So I set them to the running values from the simulated model. Having correct initial values is crucial because all optimization routines compare their output to this value.
 The starting value for delta_x of 0.05 is too unlikely with a normaldistribution of mean 1 and standard deviation 0.05, so I set the standard deviation to 1. You can try to experiment with different starting values and prior distributions.
 You used realmax as the upper bound of uniform distributions. I am not sure how Dynare treats the resulting improper prior. So I set the upper bound to 10 which is still huge.
SmallOEDSGE_Estim.mod (6.31 KB)
Thanks for your advice  you are correct  this has solved the problem.
I am now trying to resolve why my estimation output differs so much from the published paper. I suspect I am not mapping the model and data analogues correctly via the measurement equations; or, I am not representing the exogenous unrestricted VAR correctly. I was hoping to get your thoughts on this.

How would you specify the measurement equations in Dynare for a given type of observable series? what transformations should be carried out on the observable series from their raw levels.

Is the way I have represented the VAR in Dynare ok? I just did this is an ad hoc fashion  estimating the lag coefficients seperately and leaving the error terms to Dynare to sort out. It feels a bit suspect to me. Can i represent matrices in the model file?
As always your help is appreciated and informative.
NB: The related code and journal article can be found in the previous posts in this thread.