apparent data loading problem

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

apparent data loading problem

Postby jimmyk » Sun Apr 03, 2016 4:55 am

Strange problem: Several programs I've written work for my co-author on his computer, but not on mine. In one case, parameter estimates don't converge when I run the identical program with identical data, while he gets convergence. As far as I can tell, the only difference is he's on a unix system and I'm in Windows. We both run the program from the folder that has the data file. In the attached case I get errors that prevent the program from running, specifically, this happens after the steady state is calculated, at the point where the data should load: Where my colleague gets

Loading 193 observations from autodata_ur.xls

Initial value of the log posterior (or likelihood): 573.5629


I get

Error using -
Matrix dimensions must agree.

Error in set_prior (line 270)
elseif any(bayestopt_.p5-old.bayestopt_.p5(:))

Error in dynare_estimation_init (line 123)
[xparam1,estim_params_,bayestopt_,lb,ub,M_] = set_prior(estim_params_,M_,options_);

Error in dynare_estimation_1 (line 59)
[dataset_,xparam1, M_, options_, oo_, estim_params_,bayestopt_] = dynare_estimation_init(var_list_, dname, [], M_, options_,
oo_, estim_params_, bayestopt_);

Error in dynare_estimation (line 70)
dynare_estimation_1(var_list,dname);

Error in invmod6ml_ur_base (line 226)
dynare_estimation(var_list_);

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


I've run programs like this before, so I'm really baffled.
Attachments
invmod6ml_ur_base.mod
(2.12 KiB) Downloaded 53 times
jimmyk
 
Posts: 20
Joined: Fri Jul 08, 2011 8:58 pm

Re: apparent data loading problem

Postby jpfeifer » Tue Apr 05, 2016 6:14 pm

The difference between Windows and Unix most probably has to do with different random numbers. Using a longer chain should still give you convergence. The second issue you report seems to come from a
previous
Code: Select all
definition.mat

file present in the prior subfolder, although I cannot trace why such an error might occur. Have you tried Dynare 4.4.3? In any case, you should be able to run the file in an empty folder.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: apparent data loading problem

Postby jimmyk » Wed Apr 06, 2016 4:50 am

Yes, both of these problems occurred with 4.4.3. I will try your solutions, thanks for responding.
jimmyk
 
Posts: 20
Joined: Fri Jul 08, 2011 8:58 pm

Re: apparent data loading problem

Postby jpfeifer » Wed Apr 06, 2016 7:52 am

You cannot have used Dynare 4.4.3, because there line 270 of set_prior.m is different.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: apparent data loading problem

Postby jimmyk » Sat Apr 16, 2016 11:32 am

I should have said they *also* occurred with 4.4.3. I had originally run them on 4.4.3, but when they didn't run on my computer, but did on my colleagues (who was running an earlier version), I then ran them on the earlier version, thinking maybe it was a problem with 4.4.3.

In any case, I was able to get the program that I had attached to run properly from an empty folder. As for the other problem with parameter estimates not converging: I should have mentioned that I was just using ML estimation, not Bayesian. Does that even use random number generation? And if so, is the chain something set in Dynare or in Matlab? Thanks again, and I was traveling for a week hence my delayed response.
jimmyk
 
Posts: 20
Joined: Fri Jul 08, 2011 8:58 pm

Re: apparent data loading problem

Postby jpfeifer » Mon Apr 18, 2016 8:44 pm

The chain comment refers to Bayesian. If you do ML, the answer depends on the mode-finder. If you use
Code: Select all
mode_compute=4
that randomly perturbs the search direction, which can explain the difference (similarly for 6 and 9).
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests