Created
November 14, 2012 01:10
-
-
Save cbare/4069566 to your computer and use it in GitHub Desktop.
mvnorn test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(MASS) | |
| CreateSigma <- function(rho, p) { | |
| aux1 <- matrix(rep(1:p, p), p, p) | |
| aux2 <- matrix(rep(1:p, each = p), p, p) | |
| rho^abs(aux1 - aux2) | |
| } | |
| rho <- 0.5 | |
| p <- 3 | |
| n <- 3 | |
| # set RNG seed | |
| set.seed(72386) | |
| m <- mvrnorm(n, rep(0, p), CreateSigma(rho, p)) | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a quick test to show that with the version change (7.3.20 -> 7.3.21) in the MASS library, the mvrnorm now returns different results for the same random seed.