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?
Maintaining equality of equations even after winsorizingDear all I have a dataset with equality based on the below formula Income+borrowings=consumption+sav…
Extract the last word from String variableDear all How can I extract the last word from the variable EntrySector. For example "Bangkok - Pa…
local member with blankFor example, I want to construct a local called name with several names in it: Code: local name D. …
Graph displaying too many decimal placesThe graph below is generated by these two lines of code: format %3.1g rho line rel_bias M, by(rho) I…
Use of Rosenbaum Bounds sensitivity analysisHi everyone, I read up on the Rosenbaum sensitivity analysis and understand that it's usually used t…
Subscribe to:
Post Comments (Atom)
0 Response to Loop?
Post a Comment