# Estimation error with 'loglinear' options

**URL:** <https://forum.dynare.org/t/estimation-error-with-loglinear-options/2447>\
**Category:** Dynare help (legacy posts)\
**Created:** [5 April 2012 15:03 UTC](https://forum.dynare.org/t/estimation-error-with-loglinear-options/2447 "2012-04-05T15:03:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![flyingpig](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ed8c4c/32.png) [@flyingpig](https://forum.dynare.org/u/flyingpig)\
**Post date:** [5 April 2012 15:03 UTC](https://forum.dynare.org/t/estimation-error-with-loglinear-options/2447/1 "2012-04-05T15:03:18Z")

</div>

Hello, I have a problem when putting ‘loglinear’ into ‘estimation’ options, as below:

??? Error using ==\> dynare\_estimation\_init at 303  
There are complex values in the data! Probably a wrong transformation

Error in ==\> dynare\_estimation\_1 at 37  
[data,rawdata,xparam1] = dynare\_estimation\_init(var\_list\_);

Error in ==\> dynare\_estimation at 62  
dynare\_estimation\_1(var\_list,varargin{:});

Error in ==\> essay2\_b at 273  
dynare\_estimation(var\_list\_);

Error in ==\> dynare at 120  
evalin(‘base’,fname) ;

What does it mean complex value in data, I use simulated data, not any complex value.

---

<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 2012 19:53 UTC](https://forum.dynare.org/t/estimation-error-with-loglinear-options/2447/2 "2012-04-18T19:53:33Z")

</div>

It means your variable definitions do not correspond to the data definition. If you take logs of a negative variable in Matlab, this yields a complex number. Hence, the error.
