oneWald | R Documentation |
Performs a Wald test to evaluate the significance of the one-inflation parameters
in a model estimated using oneinfl
.
oneWald(model)
model |
A model object of class |
The Wald test evaluates the null hypothesis that all one-inflation parameters
(gamma
) are equal to zero, indicating no one-inflation. The test statistic
is calculated as:
W = \gamma^\top V^{-1} \gamma
where \gamma
is the vector of one-inflation parameters and V
is their
variance-covariance matrix. The p-value is computed using a chi-squared distribution
with degrees of freedom equal to the length of \gamma
.
This test is commonly used to determine whether a one-inflated model provides a significantly better fit than a non-one-inflated counterpart.
A list with the following components:
W
The Wald test statistic.
pval
The p-value associated with the test statistic, based on a chi-squared distribution.
oneinfl
for fitting one-inflated models.
oneLRT
for a likelihood ratio test of nested models.
pchisq
for the chi-squared distribution.
# Example usage
df <- data.frame(y = rpois(100, lambda = 5), x = rnorm(100), z = rnorm(100))
OIZTNB <- oneinfl(y ~ x | z, df = df, dist = "negbin")
oneWald(OIZTNB)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.