Page 1 of 1

Identification: Error message

PostPosted: Fri Nov 30, 2012 12:55 pm
by Niklas
Hello,

I am getting the following error message when using the command "identification":

Attempted to access idx(1); index out of bounds because numel(idx)=0.

Error in vnorm (line 72)
dim = idx(1);

Error in identification_analysis (line 238)
siLREnorm = vnorm(quant).*normaliz1(offset+1:end);

Error in dynare_identification (line 259)
[idehess_point, idemoments_point, idemodel_point, idelre_point, derivatives_info_point] = ...

Error in Error_message (line 199)
dynare_identification(options_ident);

Error in dynare (line 120)
evalin('base',fname) ;


I have attached the mod-file and the data. Does anyone know what the problem is?

I am thankful for any help,
regards,
Niklas

Re: Identification: Error message

PostPosted: Mon Dec 03, 2012 4:55 pm
by Niklas
Hello,

I boiled down the problem to a simple AR(1) process and still get the same error message as above. Yet, I still don't know why. There must be an obvious reason. Maybe someone can see the problem.
Here the mod.file:

Code: Select all
var a;
varexo e;

parameters rho a_ss;
rho = 0.9;
a_ss = 1;

model;
a=(1-rho)*a_ss+rho*a(-1)+e;
end;

initval;
a=a_ss;
end;

steady;
check;

shocks;
var e = 1;
end;

stoch_simul(order = 1, irf=20);

estimated_params;
rho, 0.8, beta_pdf, 0.8, 0.1;
end;

varobs a;

identification;


Any help would be highly appreciated,
Regards,
Niklas

Re: Identification: Error message

PostPosted: Tue Dec 04, 2012 7:19 am
by rattoma
Hi,

I am fixing the bug and let you know asap
Marco

Re: Identification: Error message

PostPosted: Tue Dec 04, 2012 1:29 pm
by Niklas
Dear Marco,

thank you very much!

Maybe the following observation might help: If I simply add the AR(1) process a=(1-rho)*a_ss+rho*a(-1)+e to e.g. your test mod.file Kim(2003) as an additional line, but without observing the variable a, the identification tolbox correctly reports that the smoothing paramater cannot be identified. Once I comment out the model Kim(2003), I get the error message from above again, although the model and the AR(1) process were not related to each other.

Best,
Niklas

Re: Identification: Error message

PostPosted: Wed Dec 05, 2012 11:19 am
by rattoma
Hi there,

I have fixed the bug. This happens when there is only one estimated parameter.
The bug fix is pushed to the git repository, but I also attach the relevant files to be upodated in the matlab folder for version 4.3.1. Please tell me if you have further problems.

Marco

Re: Identification: Error message

PostPosted: Thu Dec 06, 2012 9:58 pm
by Niklas
Dear Marco,

thank you very much for your help!
Is is it right that I just have to replace the old identification_analysis.m and getJJ.m files in my dynare 4.3.1\matlab folder to fix the bug? I did this, but I still get the same error message. I also downloaded and installed version 4.3.1 again and still get the same error message.

Best,
Niklas

Re: Identification: Error message

PostPosted: Fri Dec 07, 2012 7:16 am
by rattoma
Indeed you should replace the routines in the distribution package of 4.3.1 with the ones I sent.
My guess is that you have multiple dynare versions in your path so that matlab is using an older set of routines?
Anyhow the routines I attached work with the example you sent me.

best
Marco