Description Usage Arguments Details Value Author(s) References See Also Examples
Normalizes as feature scaling min - max
, or unity-based
normalization typically used to bring the values into the range [0,1].
Other methods are also available, including scoring, centering,
and Smithson and Verkuilen (2006) method of dependent variable transformation.
1 |
x |
is a vector to be normalized. |
method |
A string for the method used for normalization. Default is |
... |
Additional arguements (currently ignored). |
The following methods are available:
"range"Ranging is done by coercing x
values into [0,1] range.
However, this may be generalized to follow the range of other arbitrary values
using a
and b
:
X' = a + \frac{(x - x_{min})(b - a)}{(x_{max} - x_{min})}
.
"scale"Scaling is done by dividing (centered) values of x
by
their standard deviations.
"center"Centering is done by subtracting the means (omitting NAs)
of x
from its observed value.
"z-score"Scoring is done by dividing the values of x
from their root mean square.
"SV"Transform a dependent variable in [0,1] rather than (0, 1) to beta regression as suggested by Smithson and Verkuilen (2006).
Normalized values in an object of the same class as x
.
Daniel Marcelino, dmarcelino@live.com
Smithson M, Verkuilen J (2006) A Better Lemon Squeezer? Maximum-Likelihood Regression with Beta-Distributed Dependent Variables. Psychological Methods, 11(1), 54-71.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | x <- sample(10)
(y = Normalize(x) )
# equivalently to
(x-min(x))/(max(x)-min(x))
# Smithson and Verkuilen approach
(y = Normalize(x, method="SV") )
# look at what happens to the correlation of two independent variables and their "interaction"
# With non-centered interactions:
a = rnorm(10000,20,2)
b = rnorm(10000,10,2)
cor(a,b)
cor(a,a*b)
# With centered interactions:
c = a - 20
d = b - 10
cor(c,c*d)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.