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) | |
| library(mvtnorm) | |
| # Set parameters for generating simulated data | |
| set.seed(1) | |
| mu = c(.1,1.5) | |
| Sigma = matrix(c(1.5,.5,.5,.7),2,2) | |
| # Set minumum | |
| m = 1 |
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) | |
| # Generate simulated data | |
| set.seed(1) | |
| mu = c(1,1.5) | |
| Sigma = matrix(c(1.5,-.5,-.5,.7),2,2) | |
| X = mvrnorm(10000000,mu,Sigma) | |
| # Calculate pairwise minimums | |
| mins = pmin(X[,1],X[,2]) |