rBED {MDBED} | R Documentation |
Bivariate generator of the bivariate exponential distribution (BED) based on the Moran-Downton model
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
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 Nagao and Kadoya (1971). 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
Nagao M, Kadoya M (1971). “Two-variate Exponential Distribution and Its Numerical Table for Engineering Application.” Bulletin of the Disaster Prevention Research Institute, 20(3), 34.
Examples
rBED(n=100,Betax=1,Betay=1,rho=0.85)