Learn R Programming

parameters (version 0.10.1)

p_value.zeroinfl: p-values for Models with Zero-Inflation

Description

This function attempts to return, or compute, p-values of hurdle and zero-inflated models.

Usage

# S3 method for zeroinfl
p_value(
  model,
  component = c("all", "conditional", "zi", "zero_inflated"),
  method = NULL,
  verbose = TRUE,
  ...
)

# S3 method for zcpglm p_value(model, component = c("all", "conditional", "zi", "zero_inflated"), ...)

Arguments

model

A statistical model.

component

Should all parameters, parameters for the conditional model, or for the zero-inflated part of the model be returned? Applies to models with zero-inflated component. component may be one of "conditional", "zi", "zero-inflated" or "all" (default). May be abbreviated.

method

If "robust", and if model is supported by the sandwich or clubSandwich packages, computes p-values based on robust covariance matrix estimation.

verbose

Toggle warnings and messages.

...

Arguments passed down to standard_error_robust() when confidence intervals or p-values based on robust standard errors should be computed. Only available for models where method = "robust" is supported.

Value

A data frame with at least two columns: the parameter names and the p-values. Depending on the model, may also include columns for model components etc.

Examples

Run this code
# NOT RUN {
if (require("pscl")) {
  data("bioChemists")
  model <- zeroinfl(art ~ fem + mar + kid5 | kid5 + phd, data = bioChemists)
  p_value(model)
  p_value(model, component = "zi")
}
# }

Run the code above in your browser using DataLab