Normalizes a matrix of variables based on nonlinear scaling normalization method.
Arguments
- X
a numeric matrix or data frame, or a list.
- linear
logical;
FALSE(default) performs the nonlinear scaling normalization (each variable's mean-ratio scale is weighted by its correlation / NNS.dep dependence with the other variables).TRUEperforms a linear scaling normalization, resulting in equal means for all variables. Both scale by ratios of means, so they assume variables with positive means; a zero mean is replaced by 1e-10 (giving extreme scale factors).- chart.type
options: ("l", "b");
NULL(default). Set(chart.type = "l")for line,(chart.type = "b")for boxplot.- location
Sets the legend location within the plot, per the
xandyco-ordinates used in base graphics legend.
Value
Returns a data.frame of normalized values.
References
Viole, F. and Nawrocki, D. (2013) "Nonlinear Nonparametric Statistics: Using Partial Moments" (ISBN: 1490523995, 2nd edition: https://ovvo-financial.github.io/NNS/book/)
Examples
if (FALSE) { # \dontrun{
set.seed(123)
x <- rnorm(100) ; y <- rnorm(100)
A <- cbind(x, y)
NNS.norm(A)
### Normalize list of unequal vector lengths
vec1 <- c(1, 2, 3, 4, 5, 6, 7)
vec2 <- c(10, 20, 30, 40, 50, 60)
vec3 <- c(0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3)
vec_list <- list(vec1, vec2, vec3)
NNS.norm(vec_list)
} # }