snp.quant {SimHap}R Documentation

Single SNP analysis for quantitative outcomes

Description

snp.quant is used to fit linear regression models to single SNP genotype and phenotype data for continuous Normal outcomes.

Usage

snp.quant(formula1, formula2, geno, pheno, sub = NULL, 
        predict_variable = NULL)

Arguments

formula1 a symbolic description of the full model to be fit, including SNP parameters. The details of model specification are given below.
formula2 a symbolic description of the nested model excluding SNP parameters, to be compared to formula1 in a likelihood ratio test.
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.
predict_variable a factored SNP variable, at each level of which the response variable will be predicted based on the model fit using formula1.

Details

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 formula function for more details of allowed formulae.

Value

snp.quant returns an object of 'class' snpQuant.
The summary function can be used to obtain and print a summary of the results.
An object of class snpQuant is a list containing the following components:

results a table containing the coefficients, standard errors and p-values of the parameter estimates.
formula1 formula1 passed to snp.quant.
formula2 formula2 passed to snp.quant.
LRT a likelihood ratio test, testing for significant improvement of the model when genotypic parameters are included.
ANOD analysis of deviance table for the model fit using formula1.
logLik the log-likelihood for the linear model fit using formula1.
fit.lm a lm object fit using formula1.
fitsub.lm a lm object fit using formula2.
rsquared r-squared values for models fit using formula1 and formula2.
predicted.values estimated marginal means of the outcome variable broken down by SNP levels, evaluated at mean values of the model predictors.
AIC Akaike Information Criterion for the linear model fit using formula1.

Author(s)

Pamela A. McCaskie

References

Chambers, J.M. (1992) Linear models. Chapter 4 of Statistical Models in S, eds Chambers, J.M., Hastie, T.J., Wadsworth & Brooks/Cole.

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.

Wilkinson, G.N., Rogers, C.E. (1973) Symbolic descriptions of factorial models for analysis of variance. Applied Statistics, 22, 392-9.

See Also

snp.bin

Examples


data(SNP.dat)

# convert SNP.dat to format required by snp.quant
geno.dat <- SNP2Geno(SNP.dat, baseline=c("MM", "11", "GG", "CC"))

data(pheno.dat)
mymodel <- snp.quant(formula1=HDL~AGE+SBP+factor(SNP_1_add),
        formula2=HDL~AGE+SBP, geno=geno.dat, pheno=pheno.dat)
summary(mymodel)

# example using a variable for which to predict marginal means
mymodel <- snp.quant(formula1=HDL~AGE+SBP+factor(SNP_1_add),
        formula2=HDL~AGE+SBP, geno=geno.dat, pheno=pheno.dat, 
        predict_variable="SNP_1_add")
summary(mymodel)

# example with a subsetting variable, looking at males only
mymodel <- snp.quant(formula1=HDL~AGE+SBP+factor(SNP_1_add),
        formula2=HDL~AGE+SBP, geno=geno.dat, pheno=pheno.dat, 
        sub=expression(SEX==1))
 

[Package SimHap version 1.0.0 Index]