| haplo.bin {SimHap} | R Documentation |
haplo.bin performes a series of generalized linear models using a simulation-based approach to account for uncertainty in haplotype assignment when phase is unknown.
haplo.bin(formula1, formula2, pheno, haplo, sim, effect = "add",
sub = NULL)
formula1 |
a symbolic description of the full model including haplotype parameters to be fit. The details of model specification are given below. |
formula2 |
a symbolic description of the nested model excluding haplotype parameters, to be compared to formula1 in a likelihood ratio test. |
pheno |
a phenotype data set. |
haplo |
a haplo object made by make.haplo.rare. |
sim |
the number of simulations from which to evaluate the results. |
effect |
the genetic effect type: "add" for additive, "dom" for dominant and "rec" for recessive. Defaults to additive. See note. |
sub |
an expression representing a subset of the data on which to perform the models. |
formula1 should be in the form outcome ~ predictor(s) + haplotype(s) and formula2 should be in the form outcome ~ predictor(s). A formula has an implied intercept term. See documentation for the formula function for more details of allowed formulae.
haplo.bin returns an object of class hapBin.
The summary function can be used to obtain and print a
summary of the results.
An object of class hapBin is a list containing the
following components:
formula1 |
formula1 passed to haplo.bin. |
formula1 |
formula2 passed to haplo.bin. |
results |
a table containing the odds ratios, confidence intervals and p-values of the parameter estimates, averaged over the sim models performed. |
empiricalResults |
a list containing the odds ratios, confidence intervals and p-values calculated at each simulation. |
ANOD |
analysis of deviance table for the model fit using formula1, averaged over all simulations. |
logLik |
the average log-likelihood for the generalized linear model fit using formula1. |
LRT |
a likelihood ratio test, testing for significant improvement of the model when haplotypic parameters are included. |
aic |
Akaike Information Criterion for the generalized linear model fit using
formula1, averaged over all simulations. |
aicPredicted |
Akaike Information Criteria calculated at each simulation. |
effect |
the haplotypic effect modelled, `ADDITIVE', `DOMINANT' or `RECESSIVE'. |
To model a codominant haplotypic effect, define the desired haplotype as a factor in the formula1 argument. e.g. factor(h.AAA), and use the default option for effect.
Pamela A. McCaskie
Dobson, A.J. (1990) An Introduction to Generalized Linear Models. London: Chapman and Hall.
Hastie, T.J., Pregibon, D. (1992) Generalized linear models. Chapter 6 of Statistical Models in S, eds Chambers, J.M., Hastie, T.J., Wadsworth & Brooks/Cole.
Little, R.J.A., Rubin, D.B. (2002) Statistical Analysis with Missing Data. John Wiley and Sons, New Jersey.
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.
McCullagh, P., Nelder, J.A. (1989) Generalized Linear Models. London: Chapman and Hall.
Rubin, D.B. (1996) Multiple imputation after 18+ years (with discussion). Journal of the American Statistical Society, 91:473-489.
Venables, W.N., Ripley, D.B. (2002) Modern Applied Statistics with S. New York: Springer.
snp.bin, haplo.quant, haplo.quant, haplo.long
data(SNP.dat)
# convert SNP.dat to format required by infer.haplos
haplo.dat <- SNP2Haplo(SNP.dat)
data(pheno.dat)
# generate haplotype frequencies and haplotype design matrix
myinfer<-infer.haplos(haplo.dat)
# print haplotype frequencies generated by infer.haplos
myinfer$hap.freq
# generate haplo object where haplotypes with a frequency
# below min.freq are grouped as a category called "rare"
myhaplo<-make.haplo.rare(myinfer,min.freq=0.05)
mymodel <- haplo.bin(formula1=PLAQUE~AGE+SBP+h.N1AA,
formula2=PLAQUE~AGE+SBP, pheno=pheno.dat, haplo=myhaplo, sim=10)
# example with a subsetting variable, looking at males only
# and modelling a dominant haplotypic effect
mymodel <- haplo.bin(formula1=PLAQUE~AGE+SBP+h.N1AA,
formula2=PLAQUE~AGE+SBP, pheno=pheno.dat, haplo=myhaplo,
sim=10, effect="dom", sub=expression(SEX==1))