osr error

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

osr error

Postby tavakolianh » Fri Dec 12, 2014 7:21 am

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
tavakolianh
 
Posts: 5
Joined: Wed Nov 09, 2011 2:48 pm

Re: osr error

Postby jpfeifer » Fri Dec 12, 2014 12:44 pm

Please provide the files.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: osr error

Postby tavakolianh » Fri Dec 12, 2014 3:19 pm

Dear Johannes
thanks for your reply. here is my .mod file.
bests
Last edited by tavakolianh on Sat Dec 13, 2014 7:32 am, edited 1 time in total.
tavakolianh
 
Posts: 5
Joined: Wed Nov 09, 2011 2:48 pm

Re: osr error

Postby jpfeifer » Fri Dec 12, 2014 3:51 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: osr error

Postby tavakolianh » Fri Dec 12, 2014 3:58 pm

and what should I do to get rid of unit root???
tavakolianh
 
Posts: 5
Joined: Wed Nov 09, 2011 2:48 pm

Re: osr error

Postby jpfeifer » Fri Dec 12, 2014 4:21 pm

Check your model where they come from. You as the model builder must have added something that gives rise to this feature.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 10 guests