powered by
Generate sample from a multivariate normal distribution. The generator uses a singular values decomposition to draw samples from a normal distribution in the basis of the singular vector. Consequently, the covariance matrix can be singular.
rmultivariate_normal(n, mean, cov)
[matrix]
[integer] numbers of samples drawn
[vector] mean of Normal law
[matrix] covariance matrix
mean = stats::runif( n = 2 , min = -5 , max = 5 ) cov = ROOPSD::rspd_matrix(2) X = ROOPSD::rmultivariate_normal( 10000 , mean , cov )
Run the code above in your browser using DataLab