rBED: Bivariate generator of the bivariate exponential distribution...

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/rBED.R

Description

This function generates jointly random values from the BED. The required inputs are the n values to be generated, the correlation coefficient, and the scale parameters of the marginal distributions.

Usage

1
rBED(rho,Betax,Betay,n)

Arguments

rho

Correlation coefficient.

Betax

Scale parameter of the marginal distribution of x.

Betay

Scale parameter of the marginal distribution of y.

n

Number of random values to be generated.

Details

The bivariate generator generates jointly exponential random values based on the conditional distribution of Y given X=x based on Eq.18 described in \insertCiteNagao1971;textualMDBED. Thus, it first generates random values of X; then, the conditional moments associated with the values of x are computed. Finally, the random values of Y are obtained by drawing a random value from each conditional distribution associated with each value of x.

Value

A dataframe with n random values generated.

Note

The equation of the conditional PDF used to generate the bivariate values is based on the Bessel function. Therefore, for very extreme values this function may reach infinity. It may generate NA values. The rBED function is set to avoid this problem for values of n lower than 100000.

Author(s)

Luis F. Duque <lfduquey@gmail.com> <l.f.duque-yaguache2@newcastle.ac.uk>

References

\insertAllCited

Examples

1
rBED(n=100,Betax=1,Betay=1,rho=0.85)

MDBED documentation built on Feb. 22, 2020, 1:11 a.m.