tidy_zeroinfl: Tidy a 'zeroinfl' or a 'hurdle' model

View source: R/custom_tidiers.R

tidy_zeroinflR Documentation

Tidy a zeroinfl or a hurdle model

Description

[Experimental] A tidier for models generated with pscl::zeroinfl() or pscl::hurdle(). Term names will be updated to be consistent with generic models. The original term names are preserved in an "original_term" column.

Usage

tidy_zeroinfl(x, conf.int = TRUE, conf.level = 0.95, component = NULL, ...)

Arguments

x

a pscl::zeroinfl() or a pscl::hurdle() model

conf.int

logical indicating whether or not to include a confidence interval in the tidied output

conf.level

the confidence level to use for the confidence interval

component

NULL or one of "all", "conditional", "zi", or "zero_inflated"

...

additional parameters passed to parameters::model_parameters()

See Also

Other custom_tieders: tidy_broom(), tidy_multgee(), tidy_parameters(), tidy_with_broom_or_parameters()

Examples


if (.assert_package("pscl", boolean = TRUE)) {
  library(pscl)
  mod <- zeroinfl(
    art ~ fem + mar + phd,
    data = pscl::bioChemists
  )

  mod %>% tidy_zeroinfl(exponentiate = TRUE)
}


broom.helpers documentation built on Aug. 7, 2023, 5:08 p.m.