I have a large data set with 11,854 test variables and 10 covariates (cov).
Using this data set, I am running following program to get p-values for association of test variables with a certain phenotype (pheno).
Code:
unab y:rs10046242-rs13196204 local l: word count `y' matrix p = J(`l',1,.) matrix rownames p = `y' matrix colnames p = "p" local i = 1 foreach var of local y{ quietly logit pheno cov1 cov2 cov3 cov4 cov5 cov6 cov7 cov8 cov9 cov10 `var' matrix p[`i++',1] = 2*normal(-abs(_b[`var']/_se[`var'])) matlist p
The goal of this analysis is to get a distribution of lowest p-value in each step to determine which variables are strongly associated with pheno (I will pick up top 5% of variables).
To achieve this, I am wondering if I can incorporate a command to extract a variable with smallest p-value in each step and a permute command in the program above.
Any suggestions and comments will be really appreciated.
0 Response to How to combine permutation and loop command
Post a Comment