confint_2levels: Calculate 95 and 99.5 CIs for a given model.

Description Usage Arguments Value Examples

View source: R/other_functions.R

Description

Determine 95 and 99.5 CIS for both spaMM and lmer models.

Usage

1
confint_2levels(mod, method, model_type = "lmer", ...)

Arguments

mod

A model object. Fitted with either spaMM or lmer.

method

Character string. For lmer, should CIs be calculated with Wald or bootstrap?

model_type

Character string. Is the model "lmer" or "spaMM".

...

Additional arguments passed to 'confint' function (e.g. iterations for bootstrap)

Value

A data frame with CIs for coefficients.

Examples

1
2
3
4
5
#Fit test models
mod_lmer  <- lme4::lmer(disp ~ mpg + (1|cyl), data = mtcars)

#Calculate CIs
confint_2levels(mod_lmer, method = "boot", model_type = "lmer", n = 100)

LiamDBailey/baileyetal2021 documentation built on Feb. 10, 2022, 12:34 a.m.