meanCenter: Mean Center Variables

meanCenterR Documentation

Mean Center Variables

Description

This simple function subtracts the mean from a variable rendering mean-centered variables.

Usage

meanCenter(x)

Arguments

x

variable or column of data to be centered

Details

This is particularly useful in lm() with higher order terms as in moderation.

Value

a numeric; mean centered 'x'

Author(s)

Thomas D. Fletcher t.d.fletcher05@gmail.com

Examples

data(USJudgeRatings)
usCONT <- meanCenter(USJudgeRatings$CONT)
summary(usCONT)


QuantPsyc documentation built on June 4, 2022, 1:06 a.m.