Problems with comparisons
Posted:
Thu Feb 26, 2015 3:49 pm
by kindofascholar
Hi,
A coauthor and I are sharing a .mod file and an .m file containing data to estimate a model. The files are exactly the same and our versions of Dynare (4.4.3) are exactly the same. However, I am able to estimate the model on my laptop, but he is not able to on his desktop? Know any reason why this might occur? Thanks!
Re: Problems with comparisons
Posted:
Thu Feb 26, 2015 7:48 pm
by jpfeifer
Generally, this is not supposed to happen.
If your model has a singularity and you are using different operating systems (64 vs 32 bit), that could happen. Run model_diagnostics to see if anything turns up on your machine. Alternatively, if one you is using a really old Matlab version, that one could have a different random number generator.
Re: Problems with comparisons
Posted:
Thu Feb 26, 2015 11:03 pm
by kindofascholar
Thanks for the response. Both computers have 64B. I've tried model_diagnostics(M_,options_,oo_) but it doesn't give me any output in either of the computers.
Re: Problems with comparisons
Posted:
Mon Mar 02, 2015 7:03 pm
by kindofascholar
I mean that I run the code on my computer and it works. He runs the identical code on his computer and it does not work.
Re: Problems with comparisons
Posted:
Mon Mar 02, 2015 7:35 pm
by jpfeifer
I already inferred that. But what is the error message?
Re: Problems with comparisons
Posted:
Wed Mar 04, 2015 4:12 am
by kindofascholar
Hi, jpfeifer. Thanks for the help. Here is the error.
Error using lnsrch1 (line 71)
Some element of Newton direction isn't finite. Jacobian maybe singular or
there is a problem with initial values
Error in solve1 (line 107)
[x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin{:});
Error in dynare_solve (line 150)
[x,info]=solve1(func,x,j1(r(i):r(i+1)-1),j2(r(i):r(i+1)-1),jacobian_flag,
...
Error in evaluate_steady_state (line 66)
[ys,check] = dynare_solve([M.fname '_static'],...
Error in resol (line 104)
[dr.ys,M.params,info] =
evaluate_steady_state(oo.steady_state,M,options,oo,0);
Error in dynare_resolve (line 69)
[dr,info,Model,DynareOptions,DynareResults] =
resol(0,Model,DynareOptions,DynareResults);
Error in dsge_likelihood (line 256)
[T,R,SteadyState,info,Model,DynareOptions,DynareResults] =
dynare_resolve(Model,DynareOptions,DynareResults,'restrict');
Error in gmhmaxlik (line 157)
logpo2 = - feval(ObjFun,proposal,varargin{:});
Error in dynare_estimation_1 (line 437)
[xparam1,PostVar,Scale,PostMean] = ...
Error in dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);
Error in medscale_est (line 408)
dynare_estimation(var_list_);
Error in dynare (line 180)
evalin('base',fname) ;
Re: Problems with comparisons
Posted:
Wed Mar 04, 2015 12:58 pm
by jpfeifer
Dynare did encounter a parameter draw where the steady state could not be computed. Does this happen at the beginning of the MCMC?
Re: Problems with comparisons
Posted:
Wed Mar 04, 2015 3:38 pm
by kindofascholar
It happens during the tuning of the scale parameter after the second round of the estimation of the covariance matrix. The first round gives this:
==========================================================
Change in the covariance matrix = 8.9016.
Mode improvement = 465.036
New value of jscale = 0.0065414
==========================================================
In the process we get a lot of "SOLVE: maxit has been reached".
Re: Problems with comparisons
Posted:
Thu Mar 05, 2015 10:30 am
by jpfeifer
Try increasing maxit to alleviate problems in finding the steady state. E.g, call
- Code: Select all
steady(maxit=1000);
before the estimation command.
Re: Problems with comparisons
Posted:
Thu Mar 05, 2015 6:19 pm
by kindofascholar
No luck. Same thing as before. I tried with maxit=1000, 2000, and 5000.
Re: Problems with comparisons
Posted:
Fri Mar 06, 2015 7:19 am
by jpfeifer
Ok. Could you provide me with files to replicate the problem?
Re: Problems with comparisons
Posted:
Wed Mar 18, 2015 4:01 pm
by kindofascholar
Thanks, jpfeifer! We actually have the code running on both computers now. However, now when we run the estimation, we get slightly different results on each of our computers. We are not sure what the problem is. Here is the code. The m file contains the parameters. Thanks for your help!