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.

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

Examples

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
#> #> Likelihood ratio test for testing both iZIP models are equivalent #> LRT-statistic: 0.111 #> Chi-sq degrees of freedom: 1 #> P-value: 0.739