coxph function
from package survival is used.
coxph.EC(snp,phen,test.dat,covar,chr,time)test.dat test.dat ntotalntotalbetacoxph.EC function fits a Cox proportional hazards regression model with
shared frailty (random effect) in each pedigree to test association between a survival
phenotype and a single/pooled genetic variant with additive model. The trait-SNP
association test is carried out by the coxph function from package survival.
P-value from likelihood ratio test (LRT) is reported. This function is called in
coxph.ped function to test all single/pooled variants.
Terry M. Therneau and Patricia M. Grambsch (2000). Modeling Survival Data: Extending the Cox Model. Springer, New York. ISBN 0-387-98784-3.
## Not run:
# coxph.EC(snp=rsnps.dat[,"snp1"],snp1,phen="trait2",test.dat=rsnps.dat,
# covar=c("age","sex"),chr=1,time="survival_time")## End(Not run)
Run the code above in your browser using DataLab