stderror: Compute standard errors (between-subjects)

View source: R/se.R

stderrorR Documentation

Compute standard errors (between-subjects)

Description

se is used to compute the standard error(s) for one or more variables, for one or more groups in a dataframe.

Usage

stderror(data = NULL, measurevar, groupvars = NULL,
na.rm = TRUE, conf.interval = 0.95, tonumeric = TRUE)

Arguments

data

a dataframe

measurevar

the name(s) of column(s) that contain the variable to be summariezed

groupvars

a vector containing names of columns that contain grouping variables

na.rm

boolean that indicates whether to ignore NA values

conf.interval

confidence interval range

tonumeric

whether to convert variables/columns to numeric whenever possible

Value

A data.table

Note

Code adapted from R cookbook (see references)

Author(s)

Hause Lin

Examples

stderror(data = mtcars, measurevar = c("mpg", "disp"), groupvars = c("cyl", "am"))
stderror(data = ChickWeight, measurevar = "weight", groupvars = "Diet")

hauselin/hausekeep documentation built on Feb. 3, 2023, 3:09 p.m.