Page 1 of 1

Error in computing likelihood for initial parameter values

PostPosted: Sat Aug 09, 2014 2:11 pm
by sashe86
I'm estimating the SW2007 model with a slight alteration to the consumption equation. To obtain the new parameters for this alternation, I just estimated a simple OLS regression and used the coefficients from that as parameter values. However, when I run the model in Dynare, I get the following error:

Error in computing likelihood for initial parameter values
??? Error using ==> print_info at 49
The Jacobian matrix evaluated at the steady state contains elements that are not real or are
infinite

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 ==> test_wealth at 516
dynare_estimation(var_list_);

Error in ==> dynare at 120
evalin('base',fname) ;

49 error(['The Jacobian matrix evaluated at the steady state contains elements ' ...


I have tried altering the initial parameter values, but it still makes no difference. Would I need to estimate an external steady state file? Or is there anything that I could do to get the model to run.

The .mod file is attached.

Thanks for your help.
Sashe86

Re: Error in computing likelihood for initial parameter valu

PostPosted: Mon Aug 11, 2014 8:15 am
by jpfeifer
It seems that you are using an old version of the Smets Wouters file that is only compatible with Dynare 3. For an updated version that should work, see http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=3750

Re: Error in computing likelihood for initial parameter valu

PostPosted: Thu Aug 14, 2014 2:22 pm
by sashe86
Hi jpfeifer,

Thanks for your reply. I still get the same error with the updated version of the SW model. Also, I obtained this code from the Macro Model Database.

Is there anything else that could be causing this specific error?

Also note, before I got the error in computing likelihood for initial parameter values, I got a different error which said "To use an external function within the model block, you must first declare it via the external_function() statement."

Thanks.

Re: Error in computing likelihood for initial parameter valu

PostPosted: Fri Aug 15, 2014 5:15 pm
by jpfeifer
Always post the updated files that produce the error.

Re: Error in computing likelihood for initial parameter valu

PostPosted: Wed Aug 20, 2014 1:45 pm
by sashe86
Hi jpfeifer,

I've attached the .mod file and dataset I am working with, if you could take a look. I've spent alot of time trying to sort through the error messages, so once I have fixed on error, I end up with a new error. The final error I have is:

??? Error using ==> print_info at 36
The generalized Schur (QZ) decomposition failed. For more information,
see the documentation for Lapack function dgges: info=36, n=36

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 ==> trial_1808_1 at 463
dynare_estimation(var_list_);

Error in ==> dynare at 120
evalin('base',fname) ;

and this error is associated with the .mod file I have attached. I have tried using model_diagnostics, but I don't think I'm using it correctly.

Anyway, I really appreciate your help, and very sorry for all the questions.

Thanks,
SAshe86

Re: Error in computing likelihood for initial parameter valu

PostPosted: Thu Aug 21, 2014 9:00 am
by jpfeifer
You added the equation
Code: Select all
          hp = ((hp - hp(-1))/hp(-1))+ hw;

but this equation is clearly not linear.