strat_score_cal_glm: strat_score_cal_glm calculates the population stratification

View source: R/pvalues_calculation.R

strat_score_cal_glmR Documentation

strat_score_cal_glm calculates the population stratification

Description

strat_score_cal_glm calculates the population stratification

Usage

strat_score_cal_glm(dis, pc, nstrat_ss = 5)

Arguments

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

Value

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.

References

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

See Also

glm which this function wraps

Examples

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)

mqzhanglab/wHC documentation built on April 1, 2022, 6:28 p.m.