meanCenter {QuantPsyc} | R 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)
[Package QuantPsyc version 1.6 Index]