Hi,
I have a question, why the next sintaxis(with conditions) is not possible?
foreach i of numlist 1/30{
gen brd1=c if i>10
gen brd2=c if i>15
gen brd3=c if i>25
gen brd4=c if i>30
}
When I run "brd1" the values are between 1/30, and I want values between 1/10.
Thanks for your help.
S.
Related Posts with Generate vars with conditions inside a loop
One sided meta analysisI have extracted this data from studies of either treatment (group) 1 or 2. I want to run a meta-ana…
Testing statistical difference for 4 variablesI shoul perform a test for whether the means are statistically different from zero for the excess st…
How to recreate longitudinal analyses from SAS in STATA using xtgee only using SAS output???Hello all, I have been trying to recreate SAS output in Stata but keep getting discrepancies. Unfor…
groups command, export/copy table to excelthe groups function is a very useful command, however the output seems to be not very transferable -…
mi predict problemDear all, I am having problems trying to get the baseline survivor function after mi predict. I am …
Subscribe to:
Post Comments (Atom)
0 Response to Generate vars with conditions inside a loop
Post a Comment