waldtest.CountsEPPM: Wald Test of Nested Models for CountsEPPM Objects

View source: R/waldtest.CountsEPPM.R

waldtest.CountsEPPMR Documentation

Wald Test of Nested Models for CountsEPPM Objects

Description

waldtest is a generic function for comparisons of nested (generalized) linear models via Wald tests.

Usage

## S3 method for class 'CountsEPPM'
waldtest(object, ..., vcov = NULL,
   test = c("Chisq", "F"))

Arguments

object

an object of class "CountsEPPM".

...

further object specifications passed to methods. See below for details.

vcov

a function for estimating the covariance matrix of the regression coefficients. If only two models are compared it can also be the covariance matrix of the more general model.

test

character specifying whether to compute the large sample Chi-squared statistic (with asymptotic Chi-squared distribution) or the finite sample F statistic (with approximate F distribution).

Details

waldtest is a generic function for comparisons of nested (generalized)linear models via Wald tests. It does not have the same functionality as the versions of betareg and lmtest with a reduced list of arguments. With these caveats, more details can be obtained from the Details pages of those packages.

Value

An object of class "anova" which contains the residual degrees of freedom, the difference in degrees of freedom, Wald statistic (either "Chisq" or "F") and corresponding p value.

Author(s)

David M. Smith <dmccsmith@verizon.net>

References

Cribari-Neto F, Zeileis A. (2010). Beta Regression in R. Journal of Statistical Software, 34(2), 1-24. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v034.i02")}.

Zeileis A, Hothorn T. (2002). Diagnostic Checking in Regression Relationships. R News, 2(3), 7-10. https://CRAN.R-project.org/doc/Rnews/.

See Also

waldtest betareg

Examples

data("herons.group")
## Not run: 
output.fn  <- CountsEPPM(number.attempts ~ 0 + group,
 herons.group, model.type = 'mean only', model.name = 'Poisson')
output.fn.one  <- CountsEPPM(number.attempts ~ 0 + group,
 herons.group, model.type = 'mean only',
 model.name = 'negative binomial')
waldtest(output.fn, output.fn.one, test = c("Chisq", "F"), vcov =  vcov) 

## End(Not run)       

CountsEPPM documentation built on May 29, 2024, 11:54 a.m.