Learn R Programming

parameters (version 0.1.0)

ci_wald: Wald-test approximation for CIs and p-values

Description

The Wald-test approximation treats t-values as Wald z. Since the t distribution converges to the z distribution as degrees of freedom increase, this is like assuming infinite degrees of freedom. While this is unambiguously anti-conservative, this approximation appears as reasonable for reasonable sample sizes (Barr et al., 2013). That is, if we take the p-value to measure the probability of a false positive, this approximation produces a higher false positive rate than the nominal 5% at p = 0.05.

Usage

ci_wald(model, ci = 0.95, dof = Inf)

p_value_wald(model)

Arguments

model

A statistical model.

ci

Confidence Interval (CI) level. Default to 0.95 (95%).

dof

Degrees of Freedom.

Value

The p-values.

References

Barr, D. J. (2013). Random effects structure for testing interactions in linear mixed-effects models. Frontiers in psychology, 4, 328.

Examples

Run this code
# NOT RUN {
library(lme4)
model <- lmer(Petal.Length ~ Sepal.Length + (1 | Species), data = iris)
p_value_wald(model)
ci_wald(model, ci = c(0.90, 0.95))
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab