Hi all,
I would like to create weighted genetic risk scores using a combination of 27 SNPs (variables) and divide by the sum of the used weights.Then, I would like to determine the best score(s) using correlation with 2 outcomes.
This is the code I have been using to create one score and I have to repeat this using different combinations.
gen WtRiskScore= (a1X1+ a2X2+ a3X3+ anXn) / (a1+a2+a3+an)/n
pwcorr WtRiskScore outcome1 outcome1, sig
I know I have to use 'foreach' but not sure how I can ask stata to use different combinations.
Any advice is MUCH appreciated.. Thank you!
Dana
Related Posts with Generating scores using combinations of weighted variables and dividing by the sum of weights
How to deal with multicollinearity when adding fixed effects dummies in regression with cross sectional data?Hello, I have cross sectional data with 26 groups. I estimated a probit and fracreg regression for …
Creating a combined averaged using a panel datasetI have a panel dataset in vertical form with 6 countries; each shows values for 14 indicators betwee…
Best way to improve processing speed for large data sets (~3gb)How much will more RAM help me with processing speed. I am working with a dataset of 87 million rec…
Brant Test Significance QuestionHello everyone. Thank you all for taking the time to answer other questions on this forum, it had be…
scatter Y X || lfit Y X ||, by(variable)Good evening, I'd like to run scatter Y X || lfit Y X ||, by(variable) but have everything on one g…
Subscribe to:
Post Comments (Atom)
0 Response to Generating scores using combinations of weighted variables and dividing by the sum of weights
Post a Comment