rbnorm {hacks}R Documentation

Bivariate normal generator

Description

Generates random observations from the bivariate normal distribution.

Usage

rbnorm(n = 1, sigx = 1, sigy = 1, 
    rho = 0, mux = 0, muy = 0)

Arguments

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.

Author(s)

Nathan Stephens

See Also

rnorm, chol

Examples

set.seed(6501)
xx <- rbnorm(1000, 17, 29, 0.7)
sd(xx) # 16.85128 30.13945
cor(xx)[2,1] # 0.7235906

[Package hacks version 0.1-5 Index]