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

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/waldtest.CountsEPPM.R

Description

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

Usage

1
2
3
## 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 <smithdm1@us.ibm.com>

References

Cribari-Neto F, Zeileis A. (2010). Beta Regression in R. Journal of Statistical Software, 34(2), 1-24. 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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 1, 2019, 10:25 p.m.