I have an example of a regression model with leads and lags, and I was wondering if I am correctly applying the model.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(date pay ts rffr v g) 10958 .003072932 .29 4.10969 25.36 1.4429667 10989 .002277957 .36 4.235481 21.99 1.4218084 11017 .001953625 .24 4.0758677 19.73 1.4245716 11048 .000364741 .39 3.779569 19.52 1.3445238 11078 .001375698 .44 3.729078 17.37 1.209214 11109 .00021848 .38 3.825053 15.5 1.2280583 11139 -.000291317 .53 3.612278 21.11 1.1734573 11170 -.001968612 .97 3.534173 29.9 1.124311 11201 -.00081227 1.13 3.3682854 29.11 1.129638 11231 -.001452778 1.17 3.392179 30.04 1.4229046 11262 -.001372483 1.08 3.128228 22.16 1.5700403 11292 -.000512877 1.03 2.770234 26.38 1.607198 end format %td date
Code:
sort date gen date_id = _n sort date_id tsset date_id // I would like to run the following regression: // Y(t+h) = a + B(i)Y(t-i) + Delta*g + Controls + epsilon (t+h) // Y = pay; h = 3; Controls = [ts, rffr, v] // The model chooses lag lengths through AIC varsoc pay // Chooses Lag Length regress F3.pay L1.pay g ts rffr v, robust
Thanks all for any help provided.
Regards
Parvesh
0 Response to Lead and Lag Variables in Regressions
Post a Comment