iziplrtest: Likelihood Ratio Test for nested iZIP models

Description Usage Arguments See Also Examples

View source: R/inference.R

Description

Perform a likelihood ratio chi-squared test between nested iZIP models. The test statistics is calculated as 2*(llik- llik_0). The test statistics has degrees of freedom r where r is the difference in the number of parameters between the full and null models.

Usage

1
iziplrtest(object1, object2, digits = 3)

Arguments

object1

an object class 'izip', obtained from a call to glm.izip

object2

an object class 'izip', obtained from a call to glm.izip

digits

numeric; minimum number of significant digits to be used for most numbers.

See Also

glm.izip, update.izip

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(bioChemists)

## Fit full model
M_bioChem.full <- glm.izip(art ~ ., data = bioChemists)

## Fit null model; without phd
M.bioChem.null <- update(M_bioChem.full, . ~ . - phd)

## Likelihood ratio test for the nested models
iziplrtest(M_bioChem.full, M.bioChem.null) # order of objects is not important

thomas-fung/izipr documentation built on Dec. 23, 2021, 9:57 a.m.