powered by
This simple function subtracts the mean from a variable rendering mean-centered variables.
meanCenter(x)
variable or column of data to be centered
a numeric; mean centered 'x'
This is particularly useful in lm() with higher order terms as in moderation.
# NOT RUN { data(USJudgeRatings) usCONT <- meanCenter(USJudgeRatings$CONT) summary(usCONT) # }
Run the code above in your browser using DataLab