Error message: Input to SCHUR must not contain NaN or Inf

I am trying to estimate a standard DSGE model with only real rigidities. Matlab gives me the error message as follows:
??? Error using ==> schur
Input to SCHUR must not contain NaN or Inf.

Error in ==> lyapunov_symm at 62
= schur(a);

Error in ==> DsgeLikelihood at 173
Pstar = lyapunov_symm(T,RQR’,options_.qz_criterium,options_.lyapunov_complex_threshold);

Error in ==> initial_estimation_checks at 60
[fval,cost_flag,ys,trend_coeff,info] = DsgeLikelihood(xparam1,gend,data,data_index,number_of_observations,no_more_missing_observations);

Error in ==> dynare_estimation_1 at 338

Error in ==> dynare_estimation at 62

Error in ==> usmodel at 337

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

I would really appreciate if someone can tell me what is the problem. The mod file and the file calculating the steady states are attached. Thanks

I am not sure if I should use every variable as log of its value. So I replaced every variable with exp(x), but it has the same error message.
usmodel_steadystate.m (1.71 KB)
usmodel.mod (10.6 KB)


could you post the data associated? I can’t reproduce the error message without them


I cannot post the .mat data file, but I attached original excel file. I only use three observables: dc, dy and dinve (columns W, X and Y)

Your help is being greatly appreciated.
usmodel_data.xls (192 KB)

I might know what is the problem now. It is running now, but I still get the different loglikelihood value from the one generated from my GAUSS code at the initial guess.
But what I changed

  1. Anything that is a function of underlying parameters is variable rather than parameter.
  2. I rewrite everything in terms of exponential and linearize.(Which is equivalent to loglinearization).