powered by
For data formed by d-variate vectors x with sample covariance S and sample mean M, it computes the values \(z=S^{-1/2}(x-M)\)
MVStandardize(x)
a matrix of multivariate data with null mean vector and identity sample covariance matrix
a multivariate data matrix, sample size is the number of rows
x<-MASS::mvrnorm(1000,c(0,0,1,3),diag(4)) z<-MVStandardize(x) mu_z<- apply(z,2,mean) cov_z<- cov(z)
Run the code above in your browser using DataLab