Page 1 of 1

Variables timing when defining stationary variables

PostPosted: Fri Jul 29, 2016 3:30 pm
by dmbn
Hi!

Such a question. For getting the model stationarized, I define new variables as follows:
Code: Select all
Y*(t) = Y(t)/Y(t-1)

It is clear, that if Y grows with a constant rate gy, then Y* remains constant. Do these definitions and original variables belong to the dynare code besides the model equations in new variables? If yes, how do I manage the right timing for such variables? In the initial values block I set Y* = 1.006, Y = 1.006. This choise would mean Y*(0) = Y(0) = 1.006, but what is with Y(-1)? How does dynare compute then the future values for Y? Should I denote the definition above as
Code: Select all
y_(+1) = y(+1)/y

or as
Code: Select all
y_ = y/y(-1)

?

thanks in advance!!!

Re: Variables timing when defining stationary variables

PostPosted: Mon Aug 01, 2016 6:56 am
by jpfeifer
Code: Select all
y_(+1) = y(+1)/y

would be wrong as this is
E_t(y_(+1)) = E_t(y(+1))/y

and you want to enter a definition of a new variable that does not only hold in expectations, but always.

Now regarding
Code: Select all
y_ = y/y(-1)

The only way there can be a steady state for y is if y_ is equal to 1. If you want to have a mean growth rate, you need something like
Code: Select all
y_ = 1.006*y/y(-1)

It does not make sense to ask for initial values of y and y(-1). If the model is stationary, then in steady state y=y(-1).

For details on how to specify observation equations, see Pfeifer(2013): "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf.

Re: Variables timing when defining stationary variables

PostPosted: Tue Aug 30, 2016 3:19 pm
by dmbn
jpfeifer, thanks a lot!

but I'm again struggling with collinear equations.
Code: Select all
Relation 1
Colinear equations
     6     7    31    32    33    34
Relation 2
Colinear equations
     6     7    31    32    33    34
Relation 3
Colinear equations
    31    32    33    34
Relation 4
Colinear equations
    31    32    33
Relation 5
Colinear equations
    31    32    34


The equations are
Code: Select all
% stock of new technologies
gak*tzk = (chi_k_bar*(chi(-1)^ksi_k) + phi)*tzk(-1); %6
gay*tzy = (chi_y_bar*(chi(-1)^ksi_y) + phi)*tzy(-1); %7
log(tg) =  log(tg(-1)) + sigma; %31
log(tpks) = rho_st*log(tpks(-1)) + eps_st; %32
log(chi) = rho*log(chi(-1)) + eps; %33
log(x) = log(x(-1)) + varrho; %34

Nevertheless, I get the irfs, but they look terrible, the have zig-zag pathway. I saw a topic, where you say this problem arises from a complex root. Maybe it has this collinearity/timing problem as a cause. Obviously, this problem lies in this 6 equations, but although I can write the equation 6 as above, I cannot rewrite the equation 33 as
Code: Select all
log(chi(-1)) = rho*log(chi(-2)) + eps(-1); %33
.
I have absolutely no idea, where is inconsistency here. Dynare says also "All endogenous are constant or non stationary, not displaying correlations and auto-correlations".

Re: Variables timing when defining stationary variables

PostPosted: Wed Aug 31, 2016 6:26 am
by jpfeifer
When you look at the output from check you will see that your model has 7 unit roots. Unit roots will result in collinearity. For example
Code: Select all
log(x) = log(x(-1)) + varrho; %34

is a random walk. With unit roots the affected variables will be nonstationary.

Re: Variables timing when defining stationary variables

PostPosted: Wed Aug 31, 2016 9:32 am
by dmbn
I detrend all non-stationary variables by dividing them through their trends. for example
Code: Select all
tzk := Z_t^k*h_t^k/Y_t

but I think the log-equations remain as they are. or don't they? or do you mean this tedrending could be wrong? Dynare shows all variances are not a numbers. Is there an another way to find out, which 7 variables are non-stationary here?

Re: Variables timing when defining stationary variables

PostPosted: Wed Aug 31, 2016 11:38 am
by jpfeifer
As I said above: you have at least one random walk defined in your model. This will result in a unit root. There may be other cases where you have this as well.

Re: Variables timing when defining stationary variables

PostPosted: Wed Aug 31, 2016 12:04 pm
by dmbn
ok, but this random walk is a model feature. So, there will be such problems in any case? Or do I need to transform this random walk in a similar way to your paper "a guide to specifying observation equations..."? Like
Code: Select all
log(X_t) = log(X_t-1) + eps_t, g_X = X_t/X_t-1
 -> log(g_x) = log(X_t) - log(X_t-1) = eps_t
 -> tilde g_x = eps_t, where tilde g_x = log(g_x)

Re: Variables timing when defining stationary variables

PostPosted: Wed Aug 31, 2016 12:15 pm
by jpfeifer
If it is a model feature than it should be fine. But then you cannot consider unconditional moments, because they do not exist due to this model feature. It's as simple as that. There also seems to be no reason to detrend the model here. But you need to find out if all the unit roots are model features. Are there variables that should be stationary?

Re: Variables timing when defining stationary variables

PostPosted: Wed Aug 31, 2016 12:26 pm
by dmbn
jpfeifer wrote:There also seems to be no reason to detrend the model here.

Why? How do you see that?
jpfeifer wrote:But you need to find out if all the unit roots are model features.

Yeah, there is one equation for example
Code: Select all
log(tpks) = rho_st*log(tpks(-1)) + eps_st

and there is no info about rho_st. Nor in the appendix, nor in the text (its a working paper). So this could be an additional unit root as well as this couldn't be.
jpfeifer wrote:Are there variables that should be stationary?

I found out that 11 variables do not grow on the bgp. Like capital utilization U or leisure L.

Re: Variables timing when defining stationary variables

PostPosted: Thu Sep 01, 2016 7:52 am
by jpfeifer
In non-estimated models, detrending is only necessary if you have either deterministic trends or random walks with drift. Pure random walks are no problem in general.

Unless rho_st is 1, it is not a random walk.

If capital utilization and leisure have unit roots in your current model implementation, you must still have a big mistake somewhere.