Hello,
I have investigated my problem and have not been able to find a solution.
*****
I have a large number of variables (genetic SNPs, which begin "rs___") that I would like to run in a model. Rather than have:
"regress Outcome rs12345 age sex"
"regress Outcome rs123456 age sex" a large number of times,
I would instead far prefer to have something like
"regress Outcome (rs12345-rs99999) age sex", where only one rs___ variable is run in the model at a time, but it loops so goes through them all.
I have toyed with using variations of "foreach x of rs12345-rs99999" to no avail.
Does anyone have any advice?
Thank you for reading - I really appreciate it. (Note that there is a very specific reason I'm doing this in STATA rather than a genetics platform like PLINK, but I won't bore you with that).
I have investigated my problem and have not been able to find a solution.
*****
I have a large number of variables (genetic SNPs, which begin "rs___") that I would like to run in a model. Rather than have:
"regress Outcome rs12345 age sex"
"regress Outcome rs123456 age sex" a large number of times,
I would instead far prefer to have something like
"regress Outcome (rs12345-rs99999) age sex", where only one rs___ variable is run in the model at a time, but it loops so goes through them all.
I have toyed with using variations of "foreach x of rs12345-rs99999" to no avail.
Does anyone have any advice?
Thank you for reading - I really appreciate it. (Note that there is a very specific reason I'm doing this in STATA rather than a genetics platform like PLINK, but I won't bore you with that).