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
Related Posts with Looping over different lags in a regression
Collapsing time series data by geographyI have some data about social movements and it includes when social movements occurred. I'm trying t…
Bayes Factors for t-testHi Listers, A reviewer has suggested presenting Bayes Factors. I am wondering how to do this after…
sorting fully empty variables for each ID from partially missing ones (and filling them in) Goodmorning, this is my first post and I have not found any information with the Search box nor on…
Error: no observations when running regressionsHello, I am trying to run some regressions and getting an error that says there are no observations,…
While using rangerun, change the order of items in a local macro containing variable list (dummies) at each iterationThe code below records coefficient estimates at each iteration. There are always two dummy variables…
Subscribe to:
Post Comments (Atom)
0 Response to Looping over different lags in a regression
Post a Comment