Osr error

Dear Stephane,
I’m trying to use osr command in my model but I get the following error:

OSR: Initial value of the objective function: Inf

OSR: The initial value of the objective function is infinite.

OSR: Check whether the unconditional variance of a target variable is infinite

OSR: due to the presence of a unit root.
Error using osr1 (line 81)
OSR: Initial likelihood is infinite
Error in osr (line 40)
Error in milit_opt_rule (line 1269)
Error in dynare (line 180)
evalin(‘base’,fname) ;

how I should get rid of this unit root? my model is log-linearized and I’m using two simple rules very similar to that is used in dynare working paper No. 15.

Please provide the files.

Dear Johannes
thanks for your reply. here is my .mod file.

There is a whole bunch of unit roots in the model. Put

before osr to see this. You can also use

before osr to get the theoretical moments. There you can see which variables are non-stationary (as indicated by the moments being NaN). You cannot use those variables in the OSR objective as their variance is infinite.

and what should I do to get rid of unit root???

Check your model where they come from. You as the model builder must have added something that gives rise to this feature.