Dear all,
  I need to generate numbers from multivariate normal with large dimensions
(5,000,000).
Below is my code and the error I got from R. Sigma in the code is the
covariance
matrix. Can anyone give some idea on how to take care of this error. Thank
you.
                Hannah

> m <- 5000000
> m1 <- 0.5*m
> rho <- 0.5
> Sigma <- rho* matrix(1, m, m)+diag(1-rho, m)
Error in matrix(1, m, m) : too many elements specified
> mu <- c(rep(2, m1), rep(0, m-m1))
> x.mod1 <- mvrnorm(n = 1, mu, Sigma, tol = 1e-6, empirical = FALSE)
Error in mvrnorm(n = 1, mu, Sigma, tol = 1e-06, empirical = FALSE) :
  incompatible arguments

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to