getFE_glmer: Fixed effects from generalized linear mixed model

View source: R/getFE_glmer.R

getFE_glmerR Documentation

Fixed effects from generalized linear mixed model

Description

Fixed effects from generalized linear mixed model

Usage

getFE_glmer(model, ci.level = 0.95, round = 2, p.round = 3)

Arguments

model

Fitted model with lme4::glmer.

ci.level

Width of confidence intervals.

round

Rounding for all but p-values (default 2).

p.round

Rounding for p-values (default 3).

Value

A formatted data frame of fixed effects.

Examples

set.seed(234)
n1 <- 3 # groups
n2 <- 3 # observations per groups

dat <- data.frame(
  group = rep(c(LETTERS[1:n1]), each = n2),
  x1 = sample(c(0, 1), n1 * n2, replace = TRUE),
  x2 = sample(1:5, n1 * n2, replace = TRUE),
  x3 = sample(1:5, n1 * n2, replace = TRUE)
)
getFE_glmer(lme4::glmer(x1 ~ x2 + x3 + (1 | group),
  data = dat,
  family = binomial(link = "logit")
))

vjilmari/vjihelpers documentation built on May 23, 2022, 6:43 p.m.