rbnorm {hacks} | R Documentation |
Generates random observations from the bivariate normal distribution.
rbnorm(n = 1, sigx = 1, sigy = 1, rho = 0, mux = 0, muy = 0)
n |
number of observations. |
sigx |
standard deviation of x. |
sigy |
standard deviation of y. |
rho |
correlation x and y. |
mux |
mean of the x. |
muy |
mean of the y. |
Nathan Stephens
set.seed(6501) xx <- rbnorm(1000, 17, 29, 0.7) sd(xx) # 16.85128 30.13945 cor(xx)[2,1] # 0.7235906