Learn R Programming

hapassoc (version 1.2-1)

anova.hapassoc: Return likelihood ratio test of haplotype effect

Description

This function returns the likelihood ratio test statistic comparing two nested models fit with hapassoc for cohort or cross-sectional data.

Usage

## S3 method for class 'hapassoc':
anova(object, redfit, display=TRUE, \ldots)

Arguments

object
a list of class hapassoc output by the hapassoc function
redfit
A hapassoc object resulting from fitting a reduced model
display
An indicator to suppress output displayed on screen
...
additional arguments to the summary function currently unused

Value

  • LRTstatThe likelihood ratio statistic comparing the two models
  • dfDegrees of freedom of the likelihood ratio statistic
  • pvalueThe p-value of the test

Details

See the hapassoc vignette, of the same name as the package, for details.

References

Burkett K, McNeney B, Graham J (2004). A note on inference of trait associations with SNP haplotypes and other attributes in generalized linear models. Human Heredity, 57:200-206

Burkett K, Graham J and McNeney B (2006). hapassoc: Software for Likelihood Inference of Trait Associations with SNP Haplotypes and Other Attributes. Journal of Statistical Software, 16(2):1-19

See Also

pre.hapassoc,hapassoc, summary.hapassoc.

Examples

Run this code
data(hypoDatGeno)
example2.pre.hapassoc<-pre.hapassoc(hypoDatGeno, numSNPs=3, allelic=FALSE)
example2.regr <- hapassoc(affected ~ attr + hAAA+ hACA + hACC + hCAA + 
pooled, example2.pre.hapassoc, family=binomial())
example2.regr2 <- hapassoc(affected ~ attr + hAAA, example2.pre.hapassoc, 
family=binomial())
anova(example2.regr,example2.regr2)

# Returns:

#	hapassoc: likelihood ratio test

#Full model: affected ~ attr + hAAA + hACA + hACC + hCAA + pooled 
#Reduced model: affected ~ attr + hAAA 

#LR statistic = 1.5433 , df = 4 , p-value =  0.8189

Run the code above in your browser using DataLab