Hello everyone,
I got a question about the following piece of code:
forvalues k = 3 (3) 12 {
newey return, lag(`k'-1)
}
I would like it to run over the lags 2,5,8, and 11.
Stata tells me, that the option lag() is invalid.
It seems like it is only possible to put in simple numbers in lag(...) like lag(2) or lag(5) and no variables or macro names.
Is there maybe a way to solve this?
Thanks in advance!
Cyrano
0 Response to Looping over different lags in a regression
Post a Comment