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
twoway histogram gen with 0 frequencyHi! I have a question regarding the twoway histogram gen, which is a subroutine for histogram in St…
How to combine descriptive statistics and ttest resultsArray Hello; I have three dependent variable and all of them are binary, and a list of independent …
Stata Probit Model Interaction Term InterpretationHello everyone, for my thesis i am currently investigating the effects of emissions on health on a …
dsregress displays undefined error when Estimating lasso for variables of interestI am currently running a series of lasso regressions and I encountered an error that I cannot identi…
Welch's F-test as an alternative to Fisher's F.Hi Everyone, Is there an option to get Welch's F or Brown-Forsythe's F in Stata (for situations whe…
Subscribe to:
Post Comments (Atom)
0 Response to Looping over different lags in a regression
Post a Comment