Page 1 of 1

OSR problem

PostPosted: Sat Feb 06, 2010 6:46 pm
by tarampalam
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)'+ghu*Sigma_e*ghu';

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;

Re: OSR problem

PostPosted: Tue Feb 09, 2010 7:43 am
by AssiaEzzeroug
Hi,

could you post your mod-file plz?

thanks

Re: OSR problem

PostPosted: Tue Feb 09, 2010 1:46 pm
by ecpia
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

Re: OSR problem

PostPosted: Wed Feb 17, 2010 11:06 am
by SébastienVillemot
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:

Code: Select all
    i_stat_0 = 1:size(ghx,2);


Best