Optimization Error

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Optimization Error

Postby klg123 » Mon Mar 24, 2014 8:17 pm

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:

Code: Select all
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] =
resol(0,Model,DynareOptions,DynareResults);
Error in dsge_likelihood (line 256)
[T,R,SteadyState,info,Model,DynareOptions,DynareResults] =
dynare_resolve(Model,DynareOptions,DynareResults,'restrict');
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)
    dynare_estimation_1(var_list,dname);
Error in Thesis (line 390)

Error in dynare (line 180)
evalin('base',fname) ; 


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!
Attachments
Thesis.mod
(9.22 KiB) Downloaded 59 times
ThesisData.xls
(16.5 KiB) Downloaded 51 times
Last edited by klg123 on Tue Mar 25, 2014 12:15 am, edited 2 times in total.
klg123
 
Posts: 18
Joined: Fri Mar 21, 2014 7:55 pm

Re: Optimization Error

Postby jpfeifer » Tue Mar 25, 2014 11:17 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Optimization Error

Postby klg123 » Tue Mar 25, 2014 4:35 pm

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:

Code: Select all
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.
klg123
 
Posts: 18
Joined: Fri Mar 21, 2014 7:55 pm

Re: Optimization Error

Postby jpfeifer » Wed Mar 26, 2014 8:56 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 3 guests