Some variables are missing


#1

Hello,

I am new to using Bayesian estimation techniques and this is my first attempt at estimating with Dynare. It seems that in the estimation command Dynare is not reading the data file. I have made sure that the variables in the data file are the same as in varobs.
I get the following error:

You did not declare endogenous variables after the estimation/calib_smoother command.
Prior distribution for parameter betta has unbounded density!

Error using load_m_file_data_legacy (line 52)
Some variables are missing (PI c g or y)!
Error in makedataset (line 125)
DynareDataset = load_m_file_data_legacy(datafile, DynareOptions.varobs);

Sentiment2.mod (5.2 KB)
Sentiment2_steadystate.m (1.9 KB)
data_Sentiment2.m (3.6 KB)


#2

You declared

as observed, but your dataset only contains

PI_obs c_obs and so on.


#3

I fixed the problems, but again this error appears:

You did not declare endogenous variables after the estimation/calib_smoother command.
Prior distribution for parameter betta has unbounded density!

dynare_estimation_init:: The steady state at the initial parameters cannot be computed.
Error using print_info (line 76)
The steadystate file did not compute the steady state

Sentiment2_steadystate.m (1.9 KB)
Sentiment2.mod (5.2 KB)
data_Sentiment2.m (3.6 KB)


#4

Your steady state file is still wrong. For the initial parameters:

Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : 0
Equation number 8 : 0
Equation number 9 : 0
Equation number 10 : 0
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0.1789
Equation number 14 : 0
Equation number 15 : 0
Equation number 16 : 0
Equation number 17 : 0
Equation number 18 : 0
Equation number 19 : 0

#5

How did you get this result? This is different to my calculations. I get the following error.

dynare_estimation_init:: The steady state at the initial parameters cannot be computed.
Error using print_info (line 76)
The steadystate file did not compute the steady state


#6

Of course, I find this error during estimation and it is not in stochastic simulation. why?


#7

After the crash, I typed
steady
into the Matlab command window. What this suggests is that your steady state file does not solve the static model for arbitrary parameter sets. It works for the calibration you selected for stoch_simul, but not for the prior mean.


#8

For that residuals of the static equations to be zero, the sum of rhomb and lambdaPI should be equal to one (rhomb +lambdaPI =1). I applied this condition to the amount of these parameters in stochastic simulation, but did not work in the estimation? Why? Or how can I apply it?


#9

Hi,

I do not know the model and do not understand the nature of the constraint you are taking about (I suspect something is wrong in the model). But if you have this kind of hard constraint on the parameters, you cannot estimate both parameters. You have to pick one parameter for estimation, and deduce the other one wit the constraint.

Best,
Stéphane.


#10

I tried to apply this restriction but I encountered the following error:

Error in computing likelihood for initial parameter values
Error using print_info (line 42)
Blanchard Kahn conditions are not satisfied: no stable equilibrium

Error in print_info (line 42)
error([‘Blanchard Kahn conditions are not satisfied: no stable’ …

Can you guide?
Sentiment2.mod (5.3 KB)


#11
  1. Your model has a unit root, so you require the diffuse_filter-option.
  2. After that, you will get a stochastic singularity error. Search the forum on this.
  3. Are you sure your steady state makes sense? Consumption in steady state is 29561.2, n=8972.76

#12

Hello. The stochastic singularity problem was solved by deleting the observations, but after executing model_diagnostics, the following message is received:

MODEL_DIAGNOSTICS: The following endogenous variables aren’t present at the current period in the model:
k
MODEL_DIAGNOSTICS: The Jacobian of the static model is singular
MODEL_DIAGNOSTICS: there is 1 colinear relationships between the variables and the equations
Colinear variables:
c
mc
i
PI
x
w
y
n
k
m
mb
fr
ndf
dc
AUX_ENDO_LAG_11_1
Colinear equations
13 14

MODEL_DIAGNOSTICS: The singularity seems to be (partly) caused by the presence of a unit root
MODEL_DIAGNOSTICS: as the absolute value of one eigenvalue is in the range of ±1e-6 to 1.
MODEL_DIAGNOSTICS: If the model is actually supposed to feature unit root behavior, such a warning is expected,
MODEL_DIAGNOSTICS: but you should nevertheless check whether there is an additional singularity problem.
MODEL_DIAGNOSTICS: The presence of a singularity problem typically indicates that there is one
MODEL_DIAGNOSTICS: redundant equation entered in the model block, while another non-redundant equation
MODEL_DIAGNOSTICS: is missing. The problem often derives from Walras Law.

Sentiment2.mod (5.4 KB)
Sentiment2_steadystate.m (1.9 KB)

How do I find colinear relationships between the variables and the equations? which variables or equations? Is my model’s problem?


#13

The most important issue is

MODEL_DIAGNOSTICS: The following endogenous variables aren’t present at the current period in the model:
k

Thus, you must have a timing problem.


#14

Hi, I get the message mentioned above when I use the equation k=x+(1-delta)*k(-1),
but when I use the equation k(+1)=x+(1-delta)*k, I get the following message: Blanchard Kahn conditions are not satisfied: indeterminacy .
I think the second equation is correct, but how do I meet Blanchard-kahn’s condition? I still not sure how to fix the attached code after reading the forum archives.
Sentiment2.mod (5.5 KB)
Sentiment2_steadystate.m (1.9 KB)


#15

Hello, can anyone help me?


#16

You are using the predetermined_variables-command for k, so the beg`inning of period stock notation

k(+1)=x+(1-delta)*k

is the correct one. That the BK conditions are then not satisfied suggests that there is still a different timing problem.


#17

I solved the timing problem, but still remains following warning:

MODEL_DIAGNOSTICS: The Jacobian of the static model is singular
MODEL_DIAGNOSTICS: there is 1 colinear relationships between the variables and the equations
Colinear variables:
c
mc
i
PI
x
w
y
n
k
m
mb
fr
ndf
dc
Colinear equations
13 14

MODEL_DIAGNOSTICS: The singularity seems to be (partly) caused by the presence of a unit root
MODEL_DIAGNOSTICS: as the absolute value of one eigenvalue is in the range of ±1e-6 to 1.
MODEL_DIAGNOSTICS: If the model is actually supposed to feature unit root behavior, such a warning is expected,
MODEL_DIAGNOSTICS: but you should nevertheless check whether there is an additional singularity problem.
MODEL_DIAGNOSTICS: The presence of a singularity problem typically indicates that there is one
MODEL_DIAGNOSTICS: redundant equation entered in the model block, while another non-redundant equation
MODEL_DIAGNOSTICS: is missing. The problem often derives from Walras Law.

Sentiment2.mod (5.5 KB)
Sentiment2_steadystate.m (1.9 KB)
How do I find colinear relationships between the variables and the equations? which variables or equations? Is my model’s problem?


#18

Is it possible that this warning Caused from equations 10, 11, and 12?


#19

Or may be from the equality PI = mb in steady state, has arisen?


#20

Your exogenous process might be causing this. You have a money growth rule, so the nominal money stock is not stationary. It may be that in some equations you still rely on this nominal money stock instead on the stationary real one.