Learn R Programming

VGAM (version 1.1-9)

Bifgmcop: Farlie-Gumbel-Morgenstern's Bivariate Distribution

Description

Density, distribution function, and random generation for the (one parameter) bivariate Farlie-Gumbel-Morgenstern's distribution.

Usage

dbifgmcop(x1, x2, apar, log = FALSE)
pbifgmcop(q1, q2, apar)
rbifgmcop(n, apar)

Value

dbifgmcop gives the density,

pbifgmcop gives the distribution function, and

rbifgmcop generates random deviates (a two-column matrix).

Arguments

x1, x2, q1, q2

vector of quantiles.

n

number of observations. Same as in runif.

apar

the association parameter.

log

Logical. If TRUE then the logarithm is returned.

Author

T. W. Yee

Details

See bifgmcop, the VGAM family functions for estimating the parameter by maximum likelihood estimation, for the formula of the cumulative distribution function and other details.

See Also

bifgmcop.

Examples

Run this code
if (FALSE)  N <- 101; x <- seq(0.0, 1.0, len = N); apar <- 0.7
ox <- expand.grid(x, x)
zedd <- dbifgmcop(ox[, 1], ox[, 2], apar = apar)
contour(x, x, matrix(zedd, N, N), col = "blue")
zedd <- pbifgmcop(ox[, 1], ox[, 2], apar = apar)
contour(x, x, matrix(zedd, N, N), col = "blue")

plot(r <- rbifgmcop(n = 3000, apar = apar), col = "blue")
par(mfrow = c(1, 2))
hist(r[, 1])  # Should be uniform
hist(r[, 2])  # Should be uniform

Run the code above in your browser using DataLab