Estimation error with 'loglinear' options

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

Error in ==> essay2_b at 273

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

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

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.