Problems with comparisons

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!

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.

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.

What do you mean with

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.

I already inferred that. But what is the error message?

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) ;

Dynare did encounter a parameter draw where the steady state could not be computed. Does this happen at the beginning of the MCMC?

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”.

Try increasing maxit to alleviate problems in finding the steady state. E.g, call

before the estimation command.

No luck. Same thing as before. I tried with maxit=1000, 2000, and 5000.

Ok. Could you provide me with files to replicate the problem?

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!
medscale_est_new.mod (6.22 KB)
quant_lab_med_new.m (901 Bytes)

The datafile is missing.

Sorry about that!
real_dat.m (32.2 KB)