Skip to content
Prev 387435 / 398502 Next

help

Code a is working. But code b is given error like given below. How can I
write code b?
+                        sigma=matrix(c(1, .3, .3, 1), ncol=2))
[,1]        [,2]
[1,] -0.97622921 -0.87129405
[2,]  0.54763494  0.16080131
[3,] -1.16627647  0.31225125
[4,]  1.72541168  2.06513939
[5,]  0.05372489 -0.07525197
[6,] -0.85062230 -1.02188473
+                        sigma=matrix(c(.3, 1,1,1,.3, 1, 1,1, .3), ncol=3))

Error in rmvnorm(round(500, 0), mean = c(0, -1), sigma = matrix(c(0.3,  :
  mean and sigma have non-conforming size