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 solve the Hedging strategy return on investment?From 2009 to 2015, we bought companies with a median investment greater than or equal to TMFO1 based…
How to find the day of the weekHi everyone, I have a clinical intervention data with adverse events. I want to see if adverse event…
Meaning of the Oaxaca_rif result?Thank you for your answer. The following results were obtained using oaxaca_rif. ------------------…
How to test pro-poorness of growth if the sample size in two surveys are not equalHi, I would like to test pro-poorness of growth. In the example “Testing for pro-poorness of growth …
Meta analyse with STATA 15Hi, I have some problem with my new version of STATA 15, of course in the old versions it was very e…
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