Learn R Programming

RVFam (version 1.1)

coxph.EC: function for testing a single/pooled variant for survival traits with family data using Cox proportional hazards regression model

Description

Fit Cox proportional hazards regression model to test a single/pooled variant for associations against a survival phenotype with family data. The coxph function from package survival is used.

Usage

coxph.EC(snp,phen,test.dat,covar,chr,time)

Arguments

snp
a numeric vector with genotype of a single/pooled variant
phen
a character string for the phenotype name of a continuous trait of interest in test.dat
test.dat
the product of merging phenotype, genotype and pedigree data
covar
a character vector for covariates in test.dat
chr
chromosome number
time
the character string of variable named for survival time

Value

ntotal
number of individuals with genotype, phenotype and covariates
nmiss
number of individuals with missing genotype among ntotal
maf_ntotal
minor allele frequency based on ntotal
beta
regression coefficient of single SNP test or burden test
se
standard error of beta
Z
Z statistic based on signed LRT
remark
additional information of the analysis
p
LRT p-value of a single variant test or burden test
MAC
minor allele count
n0
the number of individuals with 0 copy of coded alleles
n1
the number of individuals with 1 copy of coded alleles
n2
the number of individuals with 2 copies of coded alleles

Details

The coxph.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.

References

Therneau T (2014). A Package for Survival Analysis in S. R package version 2.37-7, http://CRAN.R-project.org/package=survival.

Terry M. Therneau and Patricia M. Grambsch (2000). Modeling Survival Data: Extending the Cox Model. Springer, New York. ISBN 0-387-98784-3.

Examples

Run this code
## 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