Independent_transformation | R Documentation |
Leave-one-out method gives approximately independent sample of standard multivariate normal distribution, which then produces sample of standard univariate normal distribution.
Multi.to.Uni(x)
x |
multivariate data matrix |
Let \bar{X}_{-k}
and S_{-k}
are the sample mean sample variance
covariance matrix obtained by using all but k^{th}
data point. Then
S_{-k}^{-1/2} (X_k - \bar{X}_{-k}) , k = 1,... n
are approximately
independently distributed as N_p(0, I)
. Thus all n \times p
entries in the data matrix so constructed can be treated as
univariate samples of size n \times p
from N(0, 1)
.
Data frame contains univariate data and the index from multivariate data.
set.seed(1)
x <- MASS::mvrnorm(100, mu = rep(0, 5), diag(5))
df <- Multi.to.Uni(x)
qqnorm(df$x.new); abline(0, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.