Page 1 of 1

time as an endogenous variable

PostPosted: Thu Mar 22, 2012 10:15 pm
by hewei2004
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.

Re: time as an endogenous variable

PostPosted: Fri Mar 23, 2012 7:27 am
by jpfeifer
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.

Re: time as an endogenous variable

PostPosted: Fri Mar 23, 2012 12:54 pm
by cfp
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