Learn R Programming

parameters (version 0.2.0)

ci.merMod: Confidence Interval (CI)

Description

Compute confidence intervals (CI) for frequentist models.

Usage

# S3 method for merMod
ci(x, ci = 0.95, method = c("wald", "kenward",
  "boot"), ...)

# S3 method for glm ci(x, ci = 0.95, method = c("profile", "wald"), ...)

# S3 method for glmmTMB ci(x, ci = 0.95, component = c("all", "conditional", "zi", "zero_inflated"), ...)

# S3 method for zeroinfl ci(x, ci = 0.95, component = c("all", "conditional", "zi", "zero_inflated"), ...)

# S3 method for hurdle ci(x, ci = 0.95, component = c("all", "conditional", "zi", "zero_inflated"), ...)

# S3 method for MixMod ci(x, ci = 0.95, component = c("all", "conditional", "zi", "zero_inflated"), ...)

Arguments

x

A statistical model.

ci

Confidence Interval (CI) level. Default to 0.95 (95%).

method

For mixed models of class merMod, can be "wald" (default), "kenward" or "boot" (see p_value_kenward and lme4::confint.merMod). For generalized linear models, can be "profile" (default) or "wald".

...

Arguments passed to or from other methods.

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.

Value

A data frame containing the CI bounds.

Examples

Run this code
# NOT RUN {
library(parameters)
library(glmmTMB)

model <- glmmTMB(
  count ~ spp + mined + (1 | site),
  ziformula = ~mined,
  family = poisson(),
  data = Salamanders
)

ci(model)
ci(model, component = "zi")
# }

Run the code above in your browser using DataLab