I want to replicate this code up to stateid==32; from 1 to 32. How can I do this without typing it out 32 times. Do a loop?
gen s1_trend = time if stateid==1
recode s1_trend .=0
gen s2_trend = time if stateid==2
recode s2_trend .=0
gen s3_trend = time if stateid==3
recode s3_trend .=0
Related Posts with Loop?
Create a scatterplot using dummy variablesHi. I would like to create a scatterplot using two dummy variables, however, as you may guess, simpl…
OLS with important omitted variable due to collinearityHi Stata Forum, I need theoretical and coding help. (I am a beginner in data analysis, so if some t…
logistic reg vs Hypothesis testHi All I looked on a post written way back in 2014 and someone was asking about a hyp. test they we…
Calculate mean of each quantile/decile and get output in excel formatDear, Greetings. I like to calculate mean of each quantile on each date and take the output into a …
getdata command EUROSTATDear all, Do someone have experience with the command getdata? My wish is to import data from EUROS…
Subscribe to:
Post Comments (Atom)
0 Response to Loop?
Post a Comment