confint.boot: Bootstrap confidence intervals for Two-Level Mixed Models

View source: R/confint.R

confint.bootR Documentation

Bootstrap confidence intervals for Two-Level Mixed Models

Description

This is a wrapper for getting CIs for multiple parameters after running bootstrap_mer, to be consistent with a similar method for the bootMber class.

Usage

## S3 method for class 'boot'
confint(
  object,
  parm,
  level = 0.95,
  type = c("norm", "basic", "perc", "bca"),
  L = NULL,
  ...
)

Arguments

object

an object returned by bootstrap_mer.

parm

a specification of which parameters are to be given confidence intervals as a vector of numbers. If missing, all parameters are considered.

level

the confidence level required.

type

character indicating the type of intervals required, as described in boot.ci. Currently "stud" is not supported.

L

empirical influence values required for type = "bca" as described in boot.ci.

...

additional argument(s) passed to boot.ci.

Value

A matrix (or vector) with columns giving lower and upper confidence limits for each parameter.

Examples

library(lme4)
fm01ML <- lmer(Yield ~ (1 | Batch), Dyestuff, REML = FALSE)
mySumm <- function(x) {
  c(getME(x, "beta"), sigma(x))
}

# residual bootstrap
boo_resid <- bootstrap_mer(fm01ML, mySumm, type = "residual", nsim = 100)
confint(boo_resid, type = "bca", L = empinf_merm(fm01ML, mySumm))

marklhc/bootmlm documentation built on May 24, 2023, 9:59 a.m.