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
"variable at_exp_share11 already defined" is always displayed when I run the command."variable at_exp_share11 already defined" is always displayed when I run the command. But I can conf…
Number of Estimated Coefficients in a RegressionIs there a way to display the number coefficients estimated in a regression? I am estimating differe…
Compute Estimated Hazard and Plot Estimated Hazard Curve after Fitting a xtmelogit Survival Model in StataThe dataset is presented below, insheet using "https://ift.tt/aXA9elG", comma foreach i of varlist …
generate variable on the basis of industry year and firmDear Forum, I have the following very basic problem. Unfortunately, I couldn't find an appropriate s…
Undisplayed dates: weekends, public holidays, and other reasonsHi I have a dataset that includes daily observations and a daily date variable (DATE). Some dates a…
Subscribe to:
Post Comments (Atom)
0 Response to rolling + average
Post a Comment