Estimation and initial conditions

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.

Estimation and initial conditions

Postby colenso » Sun Mar 29, 2009 10:10 pm

I've been trying to estimate a model with Dynare but I keep getting the following error message:

Starting Dynare ...
Starting preprocessing of the model file ...
34 equation(s) found
Processing derivation ...
Processing Order 1... done
Processing Order 2... done
Processing outputs ...
Preprocessing completed.
Starting Matlab computing ...

STEADY: numerical initial values incompatible with the following equations
Columns 1 through 16

1 3 4 5 7 8 9 10 11 12 13 15 16 19 20 21

Columns 17 through 28

22 23 24 25 26 27 28 29 30 31 32 33

??? Error using ==> dynare_solve at 82
exiting ...

Error in ==> steady_ at 69
[oo_.steady_state,check] = dynare_solve([M_.fname '_static'],...

Error in ==> steady at 52
steady_;

Error in ==> tao14 at 362
steady;

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


I've gone through the code several times, but haven''t been able to find the source of the problem. Any thoughts/advice would be greatly appreciated.
Many thanks!!!

d
Attachments
data_tao.m
(10.59 KiB) Downloaded 204 times
tao14.mod
(9.7 KiB) Downloaded 451 times
colenso
 
Posts: 14
Joined: Tue Mar 17, 2009 4:13 am

Re: Estimation and initial conditions

Postby reubenpjacob » Mon Mar 30, 2009 8:23 am

i think the problem is at the 'solution' stage and not the estimation stage. why dont you set the parameters at the initial values and just do a stoch simul?
reubenpjacob
 
Posts: 133
Joined: Fri Oct 06, 2006 3:23 pm
Location: Reserve Bank of New Zealand

Re: Estimation and initial conditions

Postby StephaneAdjemian » Mon Mar 30, 2009 8:56 am

Hi,

The problem is with the values of the deep parameters. Some of them are not initialized. In this case the default value (set by Dynare) is NaN, with this value Dynare crashes because he cannot evaluate the model.

If you type (after the crash in the matlab command window):

Code: Select all
M_.param_names(find(isnan(M_.params)),:)


you will obtain:

galpha
glambdaq
glambdaa
ggammah
ggammae
gOmega
gOmegah
gOmegae
gtheta
gdelta
gphi
CeOY
ChOY
gmuboe
grhoz
grhonuz
grhoq
grhonuq
grhoa
grhovarphi
grhopsi
grhotheta
sigma
COY
CeOC
ChOC
glambdastar
glambdaK


The list of deep parameters not initialized. You have an equation for galpha, but it depends on glambdaa which in turn depends on glambdastar which is not initialized (the line 44 is commented out!). Consequently, the value of galpha is NaN, even if you wrote something for this parameter.

Best, Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Estimation and initial conditions

Postby colenso » Mon Mar 30, 2009 2:37 pm

Hi,
many thanks for your suggestion. I will definitely try giving the model some values. However, I'm a little confused in the sense that many of those parameters that I would need to give a value to, are the same parameters that I'm trying to estimate. Wouldn't that defeat the whole purpose of the estimation? I mean, if I'm fixing the parameters at some calibrated value.
Thanks again!

d
colenso
 
Posts: 14
Joined: Tue Mar 17, 2009 4:13 am

Re: Estimation and initial conditions

Postby StephaneAdjemian » Mon Mar 30, 2009 3:24 pm

No. You can calibrate a parameter at the top of the mod file and estimate this parameter (by declaring this parameter in the estimated_params block). The value of a parameter calibrated at the top of the mod file will change (during the estimation process) if this parameter is also declared as an estimated parameter.

Best,
Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Estimation and initial conditions

Postby colenso » Mon Mar 30, 2009 6:27 pm

Thank you again Stéphane for your reply.
So if you calibrate a parameter at the top of the mod file and then estimate this parameter, what would the role of the values declared under "estimated_params_init" be? Should we be matching the calibrated values with the initial values of the estimation from the beginning? Also, if no value for the parameters is set under the "estimated_params_init" option, would the calibrated values be the starting point of the estimation for those parameters declared in the model to be estimated?

Finally, as suggested I've added the value of the deep parameters and the initial error was corrected.
However, I do get the following error message:

There are 11 eigenvalue(s) larger than 1 in modulus for 11 forward-looking variable(s)
The rank condition is verified.
Loading 134 observations from data_tao.m

Error in computing likelihood for initial parameter values
??? Error using ==> print_info at 55
Blanchard Kahn conditions are not satisfied: indeterminacy

Any suggestions? Again, many thanks for all your help.

Kind regards,
d
colenso
 
Posts: 14
Joined: Tue Mar 17, 2009 4:13 am

Re: Estimation and initial conditions

Postby StephaneAdjemian » Tue Mar 31, 2009 7:05 am

Hi, By default, for the maximization of the posterior density, the parameters are initialized at the prior mean (even if these parameters are calibrated at the top of the mod file). In your mod file the calibration of the parameters is needed only beacause of the commands steady and check (lines 178 and 179).

I think that your problem is caused by the choice of the initial values in the estimated_params_init block. You have to change these values. For instance, if you use the calibrated values as initial conditions it should be ok.

Best, Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Estimation and initial conditions

Postby colenso » Tue Mar 31, 2009 2:18 pm

Thank you again Stéphane for a very useful insight and clarification.
I will definitely give your suggestions a try.
Kind regards,
d
colenso
 
Posts: 14
Joined: Tue Mar 17, 2009 4:13 am

Re: Estimation and initial conditions

Postby Lau » Sat Jan 15, 2011 1:40 am

Hi,

I got a problem which seems similar to me (same number of eigenvalue and forwward looking variables, and Dynare indicate at the first stage that rank condition is satisfied):
"There are 17 eigenvalue(s) larger than 1 in modulus
for 17 forward-looking variable(s)

The rank condition is verified.

You did not declare endogenous variables after the estimation command.
Loading 41 observations from datal.mat

Error in computing likelihood for initial parameter values
??? Error using ==> print_info at 42
Blanchard Kahn conditions are not satisfied: indeterminacy"

However, I have the same prior mean as the calibrated value and when I try to simulate rather than estimate the model, I get the following:

"There are 17 eigenvalue(s) larger than 1 in modulus
for 17 forward-looking variable(s)

The rank condition is verified.

??? Error using ==> print_info at 45
Blanchard Kahn conditions are not satisfied: indeterminacy due to rank failure"

How should I interpret this ? As a problem of initial value or a rank problem ?
Thank you.
Lau
 
Posts: 13
Joined: Tue Nov 23, 2010 6:49 pm

Re: Estimation and initial conditions

Postby jpfeifer » Sat Jan 15, 2011 8:56 am

Hi, could you please post your .mod and the datafile.
------------
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 8 guests