rbivnorm {AoE} | R Documentation |
Generates a random sample of the bivariate Normal distribution with given means, variances, and correlation.
rbivnorm(n, mean.x = 0, sd.x = 1, mean.y = 0, sd.y = 1, cor = 0)
n |
Sample size. |
mean.x, mean.y |
Means of the two components. Default value is 0. |
sd.x, sd.y |
Standard deviations of the two components. Should be positive. Default value is 1. |
cor |
Linear correlation between the two components. Should be between -1 and 1. Default value is 0. |
An n-by-2 matrix containing the generated data.
# Even for high correlation, # the bivariate normal distribution has # asymptotic independence in the tails: x <- rbivnorm(10000, cor = 0.9) plot(x[,1], x[,2]) plot(rank(x[,1]), rank(x[,2]))