time as an endogenous variable

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.

time as an endogenous variable

Postby hewei2004 » Thu Mar 22, 2012 10:15 pm

Hi,

y=theta+e
Suppose part of my model is thetabar, which is an average past y up to this point : y1+y2+y3..+yt/t
To do this time is an endogenous variable t=t(-1)+1
However time is not stationary, has no deterministic steady state.

Is there a way to do this?


I understand there is a trend option for the observational variable. But I don't think it works here. This is a calibration, no data imported, ie. y does not come from data and there is no datasheet to be imported for y. y has its own dynamic evolution equation.
hewei2004
 
Posts: 40
Joined: Thu Feb 09, 2012 1:07 am

Re: time as an endogenous variable

Postby jpfeifer » Fri Mar 23, 2012 7:27 am

If I understand you correctly, there is no way to do this as there is no way to stationarize your model. In the way you wrote it down, thetabar has infinite memory. In particular, the sum is dependent on the number of time periods since the system started. Moreover, as t goes to infinity thetabar should converge to the long-run/ergodic mean and should not be influenced by new observations. In this case, the model itself becomes stationary again, but I guess you are not interested in the limit case.
------------
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

Re: time as an endogenous variable

Postby cfp » Fri Mar 23, 2012 12:54 pm

Are you sure you don't want to take some kind of moving average. What you describe sounds like a learning model. You either assume a fixed memory and take the average over the last T observations with e.g.:
Code: Select all
@#define T = 20
thetabar(0) = 1/@{T} * (
@#for index in 0:( T - 1 )
    y(-@{index}) +
@#endfor
0 );

Or you run constant gain learning with:
Code: Select all
thetabar(0) = (1-gamma)*thetabar(-1)+gamma*y(0);


Tom
cfp
 
Posts: 60
Joined: Mon Mar 15, 2010 9:18 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests