Learn R Programming

bivariate (version 0.7.0)

42_random_numbers: Random Numbers

Description

Generate random numbers from bivariate and trivariate normal distributions.

Usage

# S3 method for NBVPDF
bvrng(f, n=1, …)
# S3 method for NTVPDF
bvrng(f, n=1, …)

Arguments

f

A nbvpdf (bivariate normal) or ntvpdf (trivariate normal) object.

n

Integer, the number of random numbers.

Ignored.

Value

A two-column or three-column numeric matrix.

Details

These functions call the rmvnorm function from the mvtnorm package.

References

Refer to the vignette for an overview, references, theoretical background and better examples.

See Also

Normal For bivarate and triviate normal distributions.

Examples

Run this code
# NOT RUN {
f <- nbvpdf ()

bvrng (f, 30)
# }

Run the code above in your browser using DataLab