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
x-axis scale for metanHi all, I am trying to create a forest plot using metan with a standardized scale of -24, 0, 1, 2, 5…
GMM, xtabond2: negative and insignificant coefficientsHello Statalister, I have been recently dealing with my model for the dissertation. I am an absolut…
How to Perform Functions within groups in a dataset?In my data set, I have a variable called "STATEID" which identifies the state to which the responden…
Align boxplot and line graphDear Statalisters, I'm trying to combine a line graph with a boxplot in one row. The axes have the …
Esttab: Drop factor variables in regression outputI would like to drop some factor variable coefficients in my regressions, since they are mere contro…
Subscribe to:
Post Comments (Atom)
0 Response to Looping over different lags in a regression
Post a Comment