[R] Problem running mvrnorm
Gang Chen
gangchen6 at gmail.com
Wed Nov 18 20:28:34 CET 2015
I’m running R 3.2.2 on a Linux server (Redhat 4.4.7-16), and having the
following problem.
It works fine with the following:
require('MASS’)
var(mvrnorm(n = 1000, rep(0, 2), Sigma=matrix(c(10,3,3,2),2,2)))
However, when running the following in a loop with simulated data (Sigma):
# Sigma defined somewhere else
mvrnorm(n=1000, rep(0, 190), Sigma)
I get this opaque message:
*** caught illegal operation ***
address 0x7fe78f8693d2, cause 'illegal operand'
Traceback:
1: eigen(Sigma, symmetric = TRUE)
2: mvrnorm(n = nr, rep(0, NN), Sigma)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
I tried to do core dump (option 1), but it didn’t go anywhere (hanging
there forever). I also ran the same code on a Mac, and there was no problem
at all. What is causing the problem on the Linux server? In case the
variance-covariance matrix ‘Sigma’ is needed, I can provide its definition
later.
Thanks,
Gang
[[alternative HTML version deleted]]
More information about the R-help
mailing list