# covariance parameters
Sigma <- matrix(c(10,3,3,2), ncol = 2)
Sigma
# generate the sample
y <- rmnorm(n = 1000, Sigma = Sigma)
var(y)
# scatterplot of a random bivariate normal sample with mean
# vector zero and covariance matrix 'Sigma'
par(pty = "s")
plot(y, xlab = "", ylab = "")
title("bivariate normal sample", font.main = 1)
# QQ-plot of transformed distances
z <- WH.normal(y)
par(pty = "s")
qqnorm(z, main = "Transformed distances QQ-plot")
abline(c(0,1), col = "red", lwd = 2, lty = 2)
Run the code above in your browser using DataLab