cmplrtest | R Documentation |
Perform a likelihood ratio chi-squared test between nested COM-Poisson 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.
cmplrtest(object1, object2, digits = 3)
object1 |
an object class 'cmp', obtained from a call to |
object2 |
an object class 'cmp', obtained from a call to |
digits |
numeric; minimum number of significant digits to be used for most numbers. |
Huang, A. (2017). Mean-parametrized Conway-Maxwell-Poisson regression models for dispersed counts. Statistical Modelling 17, 359–380.
glm.cmp
, update.cmp
## Testing for the mean coefficients data(takeoverbids) ## Fit full model M.bids.full <- glm.cmp(numbids ~ leglrest + rearest + finrest + whtknght + bidprem + insthold + size + sizesq + regulatn, data = takeoverbids) ## Fit null model; without whtknght M.bids.null <- update(M.bids.full, . ~ . - whtknght) ## Likelihood ratio test for the nested models cmplrtest(M.bids.full, M.bids.null) # order of objects is not important ## Testing for dispersion coefficients data(sitophilus) M.sit.full <- glm.cmp(formula = ninsect ~ extract, formula_nu = ~extract, data = sitophilus) ## Fit null model; dropping extract from dispersion equation M.sit.null1 <- update(M.sit.full, formula_nu. = ~1) cmplrtest(M.sit.null1, M.sit.full) ## Fit null model; using constant dispersion specification M.sit.null2 <- update(M.sit.full, formula_nu. = NULL) cmplrtest(M.sit.null2, M.sit.full)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.