Learn R Programming

sjmisc (version 1.2)

se: Standard Error for variables

Description

Compute standard error for a variable, for all variables of a data frame or for joint random and fixed effects coefficients of mixed models.

Usage

se(x)

std_e(x)

Arguments

x
(Numeric) vector, a data frame or a merMod-object as returned by the lmer-method.

Value

  • The standard error of x, or for each variable if x is a data frame, or for the coefficients of a mixed model (see coef.merMod).

Details

Unlike se.coef, which returns the standard error for fixed and random effects separately, this function computes the standard errors for joint (sums of) random and fixed effects coefficients. Hence, se returns the appropriate standard errors for coef.merMod.

Examples

Run this code
se(rnorm(n = 100, mean = 3))

data(efc)
se(efc[, 1:3])

library(lme4)
fit <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
se(fit)

Run the code above in your browser using DataLab