# Help with estimation problem with data

**URL:** <https://forum.dynare.org/t/help-with-estimation-problem-with-data/6186>\
**Category:** Dynare help (legacy posts)\
**Created:** [4 May 2017 20:36 UTC](https://forum.dynare.org/t/help-with-estimation-problem-with-data/6186 "2017-05-04T20:36:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nice](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/ecc23a/32.png) [@Nice](https://forum.dynare.org/u/Nice)\
**Post date:** [4 May 2017 20:36 UTC](https://forum.dynare.org/t/help-with-estimation-problem-with-data/6186/1 "2017-05-04T20:36:07Z")

</div>

Hello jpfeifer

I am able to run the estimation with my observables when I use data that is linearly detrended in file soe\_data\_obs\_2.m however when I hpfilter the same data with the same number of observations ( only the detrending method is different) and use the data file soe\_data\_hp.m then I get the following error message:

ou did not declare endogenous variables after the estimation/calib\_smoother command.  
Error using load\_m\_file\_data\_legacy (line 38)  
makedataset: Check that all the variables listed in varobs exist in soe\_data\_hp.m and have the same number of observations.

Error in makedataset (line 106)  
DynareDataset = load\_m\_file\_data\_legacy(datafile, DynareOptions.varobs);

Error in dynare\_estimation\_init (line 494)  
[dataset\_, dataset\_info, newdatainterfaceflag] = makedataset(options\_, options\_.dsge\_var\*options\_.dsge\_varlag, gsa\_flag);

Error in dynare\_estimation\_1 (line 94)  
[dataset\_, dataset\_info, xparam1, hh, M\_, options\_, oo\_, estim\_params\_, bayestopt\_, bounds] = …

Error in dynare\_estimation (line 92)  
dynare\_estimation\_1(var\_list,dname);

Error in soe\_hp (line 800)  
oo\_recursive\_=dynare\_estimation(var\_list\_);

Error in dynare (line 223)  
evalin(‘base’,fname) ;  
[soe\_hp.mod](https://forum.dynare.org/uploads/default/original/2X/a/a3ac4cf414c5630b508d6ef94b4042a5a61de33e.mod) (22.6 KB)  
[soe\_data\_obs\_2.m](https://forum.dynare.org/uploads/default/original/2X/2/211a8707f9dbb8d3ade6c74bb014aad8642a865f.m) (32 KB)  
[soe\_data\_hp.m](https://forum.dynare.org/uploads/default/original/2X/b/bd8df55cfac0bbaa3a8a4435222bdf4df1824b24.m) (32.4 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 May 2017 06:10 UTC](https://forum.dynare.org/t/help-with-estimation-problem-with-data/6186/2 "2017-05-05T06:10:30Z")

</div>

Your data needs to be in column vectors, which the case in soe\_data\_obs\_2.m. In the

```auto

```

they are row vectors.

---

<div class="post-metadata">

**Author:** ![Nice](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/ecc23a/32.png) [@Nice](https://forum.dynare.org/u/Nice)\
**Post date:** [5 May 2017 21:52 UTC](https://forum.dynare.org/t/help-with-estimation-problem-with-data/6186/3 "2017-05-05T21:52:40Z")

</div>

Hello jpfeifer,

Thank you! it works fine now.
