Hello.. I have a difficulty in calculating with stata the following formula.
yt= bo + xt with rolling way t=1~39, 2~40, ..... 129~167
Here, rolling way means "estimate is applied over a given data sample and the sample is moved up or "rolled" forward one observation. This process continues until all observations are exhausted. "
Basically, the b0 is yt-xt and the estimated bo is the average of yt-xt t=1~39, 2~40, ..... 129~167.
there will be total 129 estimated bo.
and for each 129 estimated bo, there will be 39 residuals. (so total 129 * 39 = 5031)
If anyone can give me some help with coding this formula, I would really appreciate it.
Thank you!
Related Posts with rolling + average
How to check for significant heterogeneity for a categorical variable with 2 interactionsDear Statlist, I am estimating whether elderly age in a healthier way because of the Long-term care…
Expanding a time series dataset by one monthHi, I have panel data and I would like to expand the dataset by one month. So I would like to expan…
Regression on Panel DataHello, I am having a bit of trouble running the xtreg command on my dataset. I have panel data on 2…
Parametric survival analysis Good morning. I am doing parametric survival analysis through streg. After streg, I got the followi…
How to do Reality check and SPA test by Stata?Dear Statalist, I want to know whether there are any user written commands by stata for performing …
Subscribe to:
Post Comments (Atom)
0 Response to rolling + average
Post a Comment