Optimization Error

I am running an initial estimation of my model with 10,000 iterations of the MH algorithm and 2 MCMC chains and am getting the following error:

Undefined function ‘Thesis_static’ for input arguments of type ‘double’.
Error in evaluate_steady_state (line 73)
[fvec,jacob] = fh_static(ys_init,exo_ss, …
Error in resol (line 104)
[dr.ys,M.params,info] = evaluate_steady_state(oo.steady_state,M,options,oo,0);
Error in dynare_resolve (line 69)
[dr,info,Model,DynareOptions,DynareResults] =
Error in dsge_likelihood (line 256)
[T,R,SteadyState,info,Model,DynareOptions,DynareResults] =
Error in gmhmaxlik (line 249)
logpo2 = - feval(ObjFun,proposal,varargin{:});
Error in dynare_estimation_1 (line 437)
[xparam1,PostVar,Scale,PostMean] = …
Error in dynare_estimation (line 89)
Error in Thesis (line 390)

Error in dynare (line 180)
evalin(‘base’,fname) ; [/code]

Any insight into what the problem is here/where the problem lies? I am attaching my mod and data file. Note that the model is written in log-linear form already.

Thank you!
Thesis.mod (9.22 KB)
ThesisData.xls (16.5 KB)

I cannot replicate the issue. The file Matlab complains to be missing is created by Dynare’s preprocessor. My suggestion is to try again (after deleting all unused files in the same folder). If the problem persists, try reinstalling Dynare.

Are you able to replicate the issue in this version when mode_compute=4?

I get the following error even after following your suggestion of deleting other files in the folder:

Error using chol Matrix must be positive definite. Error in metropolis_hastings_initialization (line 68) d = chol(vv); Error in random_walk_metropolis_hastings (line 62) ix2, ilogpo2, ModelName, MetropolisFolder, fblck, fline, npar, nblck, nruns, NewFile, MAX_nruns, d ] = ... Error in dynare_estimation_1 (line 782) feval(options_.posterior_sampling_method,objective_function,options_.proposal_distribution,xparam1,invhess,bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_); Error in dynare_estimation (line 89) dynare_estimation_1(var_list,dname); Error in Thesis (line 390) dynare_estimation(var_list_); Error in dynare (line 180) evalin('base',fname) ;

My code works when using mode_compute=6. However, this seems very inefficient and I wonder if there is another way for my particular code.

This is a common problem that has nothing to do with your initial problem. Search the forum. If other mode-finders do not work there is no general way around it. My first recommendation is to check identification.