View source: R/linear_transform.R
linear_transform | R Documentation |
The algorithm uses gradient descent algorithm to obtain the maximum of the square of sample skewness, of the kurtosis or of their average under any univariate linear transformation of the multivariate data.
linear_transform(
x,
l0 = rep(1, ncol(x)),
method = "both",
epsilon = 1e-10,
iter = 5000,
stepsize = 0.001
)
x |
multivariate data matrix. |
l0 |
starting point for projection algorithm,
default is |
method |
character strings,
one of |
epsilon |
bounds on error of optimal solution, default is |
iter |
number of iteration of projection algorithm,
default is |
stepsize |
gradient descent stepsize, default is |
max_result
: The maximum value after linear transformation.
x_uni
: Univariate data after transformation.
vector_k
: Vector of the "best" linear transformation.
error
: Error of projection algorithm.
iteration
: Number of iteration.
skewness()
,
kurtosis()
set.seed(1)
x <- MASS::mvrnorm(100, mu = rep(0, 2), diag(2))
linear_transform(x, method = "skewness")$max_result
linear_transform(x, method = "kurtosis")$max_result
linear_transform(x, method = "both")$max_result
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.