| snp.cc.match {SimHap} | R Documentation |
snp.cc.match is used to fit conditional logistic regression models to single SNP genotype and phenotype, matched case-control data.
snp.cc.match(formula1, formula2, geno, pheno, sub = NULL)
formula1 |
a symbolic description of the full model to be fit, including SNP parameters. The response must be binary indicator of case-control status, and the formula must contain a variable indicating strata, or the matching sequence. |
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 binary indicator of case-control status, and the formula must contain a variable indicating strata, or the matching sequence. |
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) + strata(strata_variable) + SNP(s)and
formula2 should be in the form: response ~ predictor(s) + strata(strata_variable).If case-control data is not matched, the
snp.bin function should be used.
snp.Clogit returns an object of class snpClogit.
The summary function can be used to obtain and print a
summary of the results.
An object of class snpClogit 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.cc.match. |
Wald |
The Wald test for overall significance of the fitted model. |
logLik |
the log-likelihood for the model fit using formula1. |
fit.clogit |
an object of class clogit fit using formula1. See clogit for details. |
rsquared |
r-squared values for models fit using formula1 and formula2. |
Pamela A. McCaskie
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.
data(SNP.dat)
# convert SNP.dat to format required by snp.cc.match
geno.dat <- SNP2Geno(SNP.dat, baseline=c("MM", "11", "GG", "CC"))
data(pheno.dat)
mymodel <- snp.cc.match(formula1=DISEASE~SBP+DBP+SNP_1_add+strata(STRAT),
formula2=DISEASE~SBP+DBP+strata(STRAT), pheno=pheno.dat,
geno=geno.dat)
summary(mymodel)
# example with subsetting variable
mymodel <- snp.cc.match(formula1=DISEASE~SBP+DBP+SNP_1_add+strata(STRAT),
formula2=DISEASE~SBP+DBP+strata(STRAT), pheno=pheno.dat,
geno=geno.dat, sub=expression(SEX==1))
summary(mymodel)