Page 1 of 1

Particle filter estimation

PostPosted: Tue Apr 02, 2013 12:38 am
by zere00
Hello

I'm trying to estimate a nonlinear model computing the likelihood using the particle filter. I understand that for making that one just need to add the "order=2" option in the "estimation" command. However, it seems that it can't compute the likelihood as it get stuck before it starts searching for the posterior mode. These are the warnings that appear:

Warning: Matrix is singular, close to singular or badly scaled. Results may be
inaccurate. RCOND = NaN.
> In sequential_importance_particle_filter at 128
In non_linear_dsge_likelihood at 358
In initial_estimation_checks at 45
In dynare_estimation_1 at 133
In dynare_estimation at 70
In Estimacion_Traspaso_Incompleto_No_Lineal at 809
In dynare at 120


I was wondering if this has anything to do that my model is mostly entirely linear. I am only interested in a particular asymmetry (more specific, asymmetric wages adjustment costs), so I used a second order approximation for that equation. I'm almost sure that the model is fine as I have successfully estimated the linear version of the model, meaning, I estimated using the first order approximation of the wage adjustment costs and losing the asymmetric component of the model.

Anyway, i attached mi mod file and my data if it helps.

Thanks in advanced.

Miguel.

Re: Particle filter estimation

PostPosted: Wed Apr 10, 2013 12:23 pm
by jpfeifer
It looks like you have an issue of sample depletion, which could happen if your starting values are too poor. Have you tried using the parameter values from the first order estimation as starting values? Moreover, it might be necessary to use
Code: Select all
options_.pruning
before estimation.

Re: Particle filter estimation

PostPosted: Wed Dec 18, 2013 4:51 pm
by federico
Hi,

I have a similar problem estimating my non linear model
I always obtain

Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 1.916570e-016.
> In sequential_importance_particle_filter at 152
In non_linear_dsge_likelihood at 321
In cmaes at 948
In dynare_estimation_1 at 539
In dynare_estimation at 84
In GS_nl at 660
In dynare at 162

I used the mode optimizer 9
I also used as initial values the values obtained from the first order estimation and i used
options_.pruning;
just before the estimation command.

Could sameone suggest any strategy to go on with my work?
Thanks

Re: Particle filter estimation

PostPosted: Wed Dec 18, 2013 4:52 pm
by federico
I forgot to attach the data

Re: Particle filter estimation

PostPosted: Fri Dec 27, 2013 8:58 am
by jpfeifer
The data is still missing.

Re: Particle filter estimation

PostPosted: Mon Dec 30, 2013 9:37 am
by federico
Unfortunatly its a mat extension and i cannot upload the data.
Solutions?

Re: Particle filter estimation

PostPosted: Mon Dec 30, 2013 9:45 am
by jpfeifer
Using a zip-file to upload everything

Re: Particle filter estimation

PostPosted: Tue Dec 31, 2013 11:18 am
by federico
Ok, now it should work.