calc_pvals: Calculating p-values for the lme4 Gaussian mixed model.

Description Usage Arguments Details Examples

View source: R/calc_pvals.R

Description

P-values are not reported for this model type due to difficulties in estimating degrees of freedom in these types of model and the fact that it is not known for sure whether the t-values do indeed follow the t distribution. With that in mind, the following function should be used with caution. If we accept that the t-value will at least approximately follow the t-distribution, then degrees of freedom must lie between the highest order grouping variable in the data and the number of observations themselves.

Usage

1
calc_pvals(lmermod)

Arguments

lmermod

model of class lmerMod

Details

Please see https://bbolker.github.io/mixedmodels-misc/glmmFAQ.html and https://stat.ethz.ch/pipermail/r-help/2006-May/094765.html for detailed information.

Personal observations are that the results from this function lie broadly in line with output from MCMCglmm, at least for simple models.

Examples

1
2
3
4
# needs data.table
library(data.table)
mod <- lmer(y ~ x + (1 | z))
calc_pvals(mod)

Euphrasiologist/VCVglmm documentation built on June 4, 2020, 7:08 p.m.