snp.surv {SimHap} | R Documentation |
snp.surv
is used to fit cox proportional hazards models to single SNP genotype and phenotype survival data.
snp.surv(formula1, formula2, geno, pheno, sub = NULL)
formula1 |
a symbolic description of the full model to be fit, including SNP parameters. The response must be a survival object as returned by the Surv function. |
formula2 |
a symbolic description of the nested model excluding SNP parameters, to be compared to formula1 in a likelihood ratio test. The response must be a survival object as returned by the Surv function. |
geno |
a dataframe containing genotype data. |
pheno |
a dataframe containing phenotype data. |
sub |
an expression representing a subset of the data on which to perform the models. |
formula1
should be in the form: response ~ predictor(s) + SNP(s)
and formula2
should be in the form: response ~ predictor(s)
. A formula has an implied intercept term. See documentation for the formula
function for more details of allowed formulae.
snp.surv
returns an object of class snpSurv
.
The summary
function can be used to obtain and print a
summary of the results.
An object of class snpSurv
is a list containing the
following components:
results |
a table containing the hazard ratios, confidence intervals and p-values of the parameter estimates. |
formula |
formula1 passed to snp.surv . |
Wald |
The Wald test for overall significance of the fitted model including SNP parameters. |
logLik |
the log-likelihood for the model fit using formula1 . |
fit.coxph |
an object of class coxph fit using formula1 . See coxph.object for details. |
rsquared |
r-squared values for models fit using formula1 and formula2 . |
Pamela A. McCaskie
Andersen, P., Gill, R. (1982) Cox's regression model for counting processes, a large sample study, Annals of Statistics, 10:1100-1120.
McCaskie, P.A., Carter, K.W, Hazelton, M., Palmer, L.J. (2007) SimHap: A comprehensive modeling framework for epidemiological outcomes and a multiple imputation approach to haplotypic analysis of population-based data, [online] www.genepi.org.au/simhap.
Therneau, T., Grambsch, P., Fleming, T. Martingale based residuals for survival models, Biometrika, 77(1):147-160.
data(SNPsurv.dat) # transforms SNPlong.dat to an object containing 3 columns # per SNP - additive, dominant and recessive, where genotypes # defined in 'baseline' serve as the baseline genotypes survGeno.dat <- SNP2Geno(SNPsurv.dat, baseline=c("V2V2", "GG", "CC")) data(survPheno.dat) mymodel <- snp.surv(formula1=Surv(time, status)~age+SNP_1_add, formula2=Surv(time, status)~age, geno=survGeno.dat, pheno=survPheno.dat) summary(mymodel) # example with subsetting variable mymodel <- snp.surv(formula1=Surv(time, status)~age+SNP_1_add, formula2=Surv(time, status)~age, pheno=survPheno.dat, geno=survGeno.dat, sub=expression(sex==1))