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

test_wealth.mod (8.69 KB)

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 [Smets/Wouters (2007) in Dynare 4.2.5)

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.

Always post the updated files that produce the error.

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

Details 2.zip (13.2 KB)

You added the equation

but this equation is clearly not linear.