Page 1 of 1

osr error

PostPosted: Fri Dec 12, 2014 7:21 am
by tavakolianh
Dear Stephane,
I'm trying to use osr command in my model but I get the following error:
OPTIMAL SIMPLE RULE


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)
osr1(i_params,i_var,W);
Error in milit_opt_rule (line 1269)
osr(var_list_,osr_params_,obj_var_,optim_weights_);
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.
bests

Re: osr error

PostPosted: Fri Dec 12, 2014 12:44 pm
by jpfeifer
Please provide the files.

Re: osr error

PostPosted: Fri Dec 12, 2014 3:19 pm
by tavakolianh
Dear Johannes
thanks for your reply. here is my .mod file.
bests

Re: osr error

PostPosted: Fri Dec 12, 2014 3:51 pm
by jpfeifer
There is a whole bunch of unit roots in the model. Put
Code: Select all
check;

before osr to see this. You can also use
Code: Select all
stoch_simul(order=1)

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.

Re: osr error

PostPosted: Fri Dec 12, 2014 3:58 pm
by tavakolianh
and what should I do to get rid of unit root???

Re: osr error

PostPosted: Fri Dec 12, 2014 4:21 pm
by jpfeifer
Check your model where they come from. You as the model builder must have added something that gives rise to this feature.