getScaleCoef | R Documentation |
scale()
The function scale()
replaces x
by (x-a)/b
,
where a
is mean(x)
and b
is sd(x)
.
The quantities a
and b
are available as attributes
of the object that is returned.
getScaleCoef(z)
z |
Object returned by |
Use of a scaled explanatory variable can be helpful in getting a model to fit. The scaling coefficient(s) will then be needed when the fitted model is used with explanatory variable values on the original scale.
A vector, whose elements are the scaling coefficients
a
and b
, or if scale=FALSE
then a
.
z <- scale(1:10)
qra::getScaleCoef(z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.