# Apparent data loading problem

**URL:** <https://forum.dynare.org/t/apparent-data-loading-problem/5403>\
**Category:** Dynare help (legacy posts)\
**Created:** [3 April 2016 04:55 UTC](https://forum.dynare.org/t/apparent-data-loading-problem/5403 "2016-04-03T04:55:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmyk](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/ba8739/32.png) [@jimmyk](https://forum.dynare.org/u/jimmyk)\
**Post date:** [3 April 2016 04:55 UTC](https://forum.dynare.org/t/apparent-data-loading-problem/5403/1 "2016-04-03T04:55:41Z")

</div>

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.  
[invmod6ml\_ur\_base.mod](https://forum.dynare.org/uploads/default/original/2X/3/3edb533f5cb9e14a363f54123bc2dbdb0729d3f5.mod) (2.12 KB)

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [5 April 2016 18:14 UTC](https://forum.dynare.org/t/apparent-data-loading-problem/5403/2 "2016-04-05T18:14:56Z")

</div>

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

```auto

```

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.

---

<div class="post-metadata">

**Author:** ![jimmyk](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/ba8739/32.png) [@jimmyk](https://forum.dynare.org/u/jimmyk)\
**Post date:** [6 April 2016 04:50 UTC](https://forum.dynare.org/t/apparent-data-loading-problem/5403/3 "2016-04-06T04:50:31Z")

</div>

Yes, both of these problems occurred with 4.4.3. I will try your solutions, thanks for responding.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [6 April 2016 07:52 UTC](https://forum.dynare.org/t/apparent-data-loading-problem/5403/4 "2016-04-06T07:52:17Z")

</div>

You cannot have used Dynare 4.4.3, because there line 270 of set\_prior.m is different.

---

<div class="post-metadata">

**Author:** ![jimmyk](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/ba8739/32.png) [@jimmyk](https://forum.dynare.org/u/jimmyk)\
**Post date:** [16 April 2016 11:32 UTC](https://forum.dynare.org/t/apparent-data-loading-problem/5403/5 "2016-04-16T11:32:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [18 April 2016 20:44 UTC](https://forum.dynare.org/t/apparent-data-loading-problem/5403/6 "2016-04-18T20:44:23Z")

</div>

The chain comment refers to Bayesian. If you do ML, the answer depends on the mode-finder. If you use `mode_compute=4` that randomly perturbs the search direction, which can explain the difference (similarly for 6 and 9).
