Dynare help! Model with Bayesian EST

Hi,everyone! I am facing the following problems, a series of problems that occurs while simulating, could you please help me fix it? **The most confusing problem is that **I have computed the steady state in the .mod file, but the following problems occur : "You Impossible to find the steady state. Either the model doesn’t have a unique steady state of the guess values are too far from the solution“

dynare fs2000

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.

Starting Dynare (version 4.2.1).
Starting preprocessing of the model file …
Substitution of exo lags: added 1 auxiliary variables and equations.
Found 30 equation(s).
Evaluating expressions…done
Computing static model derivatives:

  • order 1
    Computing dynamic model derivatives:
  • order 1
    Processing outputs …done
    Preprocessing completed.
    Starting MATLAB/Octave computing.

STEADY-STATE RESULTS:

Y 0.00625684
C 0.0185632
I -0.0123064
K -0.492254
Ke 0.0143672
D 0.137502
L 0.644124
H 0.377415
He 0.0759695
Hb 0.301446
pia 1.012
pi_st 1
r 0.1411
rf 0.035101
rl 0.0374653
w 0.0474393
mc 0.9
kap 1.27933
lam 0.15
eta 53.87
g1 1.45842
g2 1.62046
vp 1
d 1
A 2.5
Y_obs -5.07408
rd_obs 0.035101
L_obs -0.439865
pia_obs 1.012

EIGENVALUES:
Modulus Real Imaginary

           0               -0                0
  3.478e-018       3.478e-018                0
         0.8              0.8                0
        0.85             0.85                0
        0.85             0.85                0
        0.85             0.85                0
      0.9707           0.9707                0
       1.037            1.037                0
       1.263            1.263                0
         Inf              Inf                0
         Inf              Inf                0
         Inf              Inf                0
         Inf              Inf                0
         Inf              Inf                0
         Inf              Inf                0

There are 8 eigenvalue(s) larger than 1 in modulus
for 8 forward-looking variable(s)

The rank condition is verified.

You did not declare endogenous variables after the estimation command.
Loading 58 observations from data_fs2000.m

SOLVE: maxit has been reached
SOLVE: maxit has been reached
Error in computing likelihood for initial parameter values??? Error using ==> print_info at 52
Impossible to find the steady state. Either the model doesn’t have a unique steady state of the guess values are too far from the solution
Error in ==> initial_estimation_checks at 101
print_info(info, options_.noprint)

Error in ==> dynare_estimation_1 at 122
initial_estimation_checks(xparam1,gend,data,data_index,number_of_observations,no_more_missing_observations);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> fs2000 at 399
dynare_estimation(var_list_);

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

Any help from you will be warmly appreciated! Thanks!
Qingyin Ma
data_fs2000.m (3.62 KB)
fs2000.mod (5.81 KB)

I have another question. Is there anything wrong with the way I deal with the data?
In my model, I set all the variables to be stationary by assigning all the shocks to be stationary AR(1). To conduct Bayesian estimation, I have transformed some of the data ( real GDP, the amount of loan) by first taking logs, then using x12 seasonal adjustment, and finally HP filter. In this way, the transformed data correspond to the log of their corresponding endogenous variables. For the other variables( CPI ), I only take seasonal adjustment.

Regarding the steady state problem: You supply your model with the SS for the parameters to which the model is initialized in the beginning. However, your SS is a function of the parameters. Now these parameters are varied in the estimation step, but the initial values you supplied are not updated.
What you have to do is to fore example write a separate steady state file where you provide the SS values. Given that you already have the analytical solution for the SS, this is easy. There are several examples on how to supply SS-files in the forum.
Alternatively, try to put the steady state computation equations from before the model block into the initval block. In this case, Dynare should also recompute these values in each step.

Regarding the data matching problem, you need an “observation equation”. Search the forum on how to do this.

[quote=“jpfeifer”]Regarding the steady state problem: You supply your model with the SS for the parameters to which the model is initialized in the beginning. However, your SS is a function of the parameters. Now these parameters are varied in the estimation step, but the initial values you supplied are not updated.
What you have to do is to fore example write a separate steady state file where you provide the SS values. Given that you already have the analytical solution for the SS, this is easy. There are several examples on how to supply SS-files in the forum.
Alternatively, try to put the steady state computation equations from before the model block into the initval block. In this case, Dynare should also recompute these values in each step.

Regarding the data matching problem, you need an “observation equation”. Search the forum on how to do this.[/quote]

Dear professor. Thank you for your suggestions. I think there are still something i dont understand.

  1. What does it mean by saying “Impossible to find the steady state”? I have given the analytical solution for the ss, what is the steady state in this case? By the way, I followed your suggestion and put the steady state computation equations into the initval block, but the result is the same. Look at the new files.
  2. Why it appears that "Error in computing likelihood for initial parameter values“
  3. I did not log linearize the model, and I think i have given the observation function. For example, for the observed real data “Income”, after first taking logs, then seasonal adjustment, finally HP filter(the last two steps are done in eviews), we get the Y_obs, then I specified Y_obs=log(Y) in the mod file, and all variables in my model are stationary, isnt it the right observation equition? (for cpi, i only use seasonal adjustment, and write pia_obs=pia)
  4. Why are there always steady state values that do not seem normal? for example, Investment(I=-0.0123064), and Capital(K= -0.492254). Does it mean that sth is wrong with the model specification? I hope not.
    I am trying to log-linearize the model and have another try. Hope for your reply. Many thanks!
    best,
    Qingyin Ma
    data_fs2000.m (3.62 KB)
    fs2000.mod (5.5 KB)
  1. Put

before the steady command to see that your analytical steady state is wrong.
2. The error results from you not specifying initial parameter values for the estimation (how to provide them, see the manual). With Dynare’s default values (0, I guess), the model cannot be solved. Thus, there is an error.
3. I am not 100% sure (not enough time to deeply look into it), but it may be necessary to demean the variables in order to have them in deviations from steady state (or to add the SS to the observation equation).
4. Apparently, there is still an issue with the model and/or the steady state. As you do not take logs, capital cannot be negative.

Thanks,Professor! I will consider to change the model. And I may restart the question and ask for your help in future, thanks in advance!
best
Qingyin Ma