OSR problem

could somebody help me? what should I do?

??? Undefined function or variable “i_stat_0”.

Error in ==> get_variance_of_endogenous_variables at 63
vx1(i_stat,i_stat) = ghx(:,i_stat_0)vx(i_stat_0,i_stat_0)ghx(:,i_stat_0)’+ghuSigma_eghu’;

Error in ==> osr_obj at 54
vx = get_variance_of_endogenous_variables(dr,i_var);

Error in ==> csminwel at 65
[f0,cost_flag] = feval(fcn,x0,varargin{:});

Error in ==> osr1 at 98
[f,p]=csminwel(‘osr_obj’,t0,H0,],crit,nit,options_.gradient_method,i_params,…

Error in ==> osr at 47
osr1(i_params,i_var,W);

Error in ==> toke at 291
osr(var_list_,osr_params_,obj_var_,optim_weights_);

Error in ==> dynare at 132
evalin(‘base’,fname) ;

I wrote mod file:
optim_weights;
pi 1;
y 1;
end;

osr_params phi_pi phi_y;
phi_pi=1.5;
phi_y=0.5;

osr;

Hi,

could you post your mod-file plz?

thanks

Hi Assia,

I am not the original poster but I also have the same problem. I have attached a mod file, which I got it from the dynare website, that gives the same error.

Thank you,

Engin
osrgg.mod (686 Bytes)

Hi

This is a bug in Dynare, which will be fixed in the upcoming Dynare 4.1.1.

In the meantime, you can edit the file matlab/get_variance_of_endogenous_variables.m, and add the following after line 59:

    i_stat_0 = 1:size(ghx,2);

Best