get_pvalues: Get p-values for a multilevel regression model

View source: R/get_pvalues.R

get_pvaluesR Documentation

Get p-values for a multilevel regression model

Description

Takes a model fit with lmer and (optionally) an estimation method, returns a data frame containing fixed effect coefficient estimates, SE, t-values, and p-values. Can use normal approximation, Kenward-Roger approximation for degrees of freedom, or both. If Kenward-Roger approximation is used, result also contains approximated degrees of freedom.

Usage

get_pvalues(model, method = "normal")

Arguments

model

a merMod model object fit by lmer

method

p-value estimation method, defaults to "normal", can also be "KR" or "all"

Value

data frame containing fixed effect estimates, SE, t-values, (degrees of freedom if appropriate) and p-values.

Examples

require(lme4)
model <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
get_pvalues(model)
get_pvalues(model, "KR")

dmirman/gazer documentation built on Aug. 1, 2022, 2:02 p.m.