View source: R/mcmcInternals.R
centreScaleCovariates | R Documentation |
Centre and Scale Covariates
centreScaleCovariates(inData, centreCovs = TRUE, scaleCovs = TRUE)
inData |
A data.frame or object coercible to a data.frame containing the variables to centre and scale. |
centreCovs |
A logical scalar denoting whether the fixed effects in the
model should be centred before the analysis: each covariate element is
subtracted by its mean. |
scaleCovs |
A logical scalar denoting whether the fixed effects in the
model should be scaled before the analysis: each covariate element is divided
by its standard deviation. |
A data.frame object containing the scaled and centred values of the covariates. In addition the object is given two attributes:
A named numeric vector of length equal to the number of
columns in inData
that contains the number used to centre the
variable or NA
if that variable remains uncentred
A named numeric vector of length equal to the number of
columns in inData
that contains the number used to scale the
variable or NA
if that variable remains unscaled
Joseph D. Chipperfield, joechip90@googlemail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.