Problem when replicating Schmitt-Grohe & Uribe (2008)

Hi, I am trying to replicate the estimation of Baseline Model in Schmitt-Grohe & Uribe (2008) “What’s News in Business Cycle”. I tried using the posterior mean as the starting point for posterior maximation by using Chris Sim’s “csminwel”. However, the result was not desired. Most of the standard deviations were small and after obtaining the distribution, below warning message was often appeared,

Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 1.117895e-030.

MH: Let me try again.

And the Log data density obtained by Geweke Estimator is -Inf, the one in Schimitt-Grohe is about -2140. Before that, I also tried using mode_compute = 6 to get the mode by using default starting point. However, the estimation result was still not desire. The log data density is 591.437571 which is positive (impossible).

I attached my codes for reference. I would be appreciated with your help.
cycledat.m (12.6 KB)
cycle_steadystate.m (2.06 KB)
cycle.mod (5.85 KB)

There is one more attached file for running the code above.
other_params.m (778 Bytes)

I also made the log-linearization version of this. However, the result is still strange and the acceptance rate in MH algorithm is very low and the Geweke Estimator for Log Data Density is -INF. I just follow the equilibrium equations and take log-linearization to them. I don’t know what happening to my replication.

I would be appreciated if someone can help me with this.
cycle_level_steadystate.m (1.43 KB)
other_params_log.m (451 Bytes)
cycle_loglinear.mod (4.88 KB)

Another file needed for replication of result by using log-linearization version of model.
cycledat_log.m (12.7 KB)

I also made the model file which can be run in Dynare 4 as well. No additional file is needed for running the model file.
cycle_loglinear.mod (6.19 KB)