Hi,
I want to loop over 150 variables, which has the format like code_001, code_002, ....., code_150. I've tried:
foreach i in 001/150
or
forvalues i in code_001-code_150
or
foreach i in 001-150
However, none of them works.
Could you please help me to correct the syntax.
Thank you!
Related Posts with For loop in Stata
Comparing household income between two groupsHi all, So I have a dataset where my two dependent variables are 1) underwent surgery (900 patients…
Outreg2 First stage (xtivreg) Equation with random effectsI am using a panel random effects model with instrumental variables and robust clustered standard er…
Testing proportional hazard assumption in multilevel parametric event settingHello everyone, I am conducting a recurrent event-history analysis using the mestreg command with e…
Semipar trimming the plotsxtsemipar lprice ldist larea lland rooms bath age, nonpar(linst) cluster(countrynumber) ci I am run…
Logit regression, cross sectional data, country, industry and year fixed effectI face a problem in understanding the structure of my data and in estimating. For my study, I use th…
Subscribe to:
Post Comments (Atom)
0 Response to For loop in Stata
Post a Comment