View source: R/pvalues_calculation.R
strat_score_cal_glm | R Documentation |
strat_score_cal_glm calculates the population stratification
strat_score_cal_glm(dis, pc, nstrat_ss = 5)
dis |
vector of disease outcomes (1=case, 0=control) with Ntot subjects. |
pc |
first 10 principle components(defaut colum=10). |
nstrat_ss |
number of strata to be separated to, defaut 5 |
a numeric matrix with nstrat_ss-1 columns, dis length rows. each elements are 0-1 indicators which shows if this subjects belows to this strata. the last strata are subjects with all other nstrat_ss-1 columns be zero.
Epstein MP, Allen AS, Satten GA (2007) A simple and improved correction for population stratification in case-control studies. American Journal of Human Genetics 80: 921-930
glm
which this function wraps
pheno=rbinom(100,1,0.5) cur_pc=rbind(matrix(rnorm(500,0,1),ncol=10,nrow=50),matrix(rnorm(500,0.5,1),ncol=10,nrow=50)) strata=strat_score_cal_glm(pheno,cur_pc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.