Ali-Mikhail-Haq Bivariate Distribution

Description

Density, distribution function, and random generation for the (one parameter) bivariate Ali-Mikhail-Haq distribution.

Usage

1
2
3
dbiamhcop(x1, x2, apar, log = FALSE)
pbiamhcop(q1, q2, apar)
rbiamhcop(n, apar)

Arguments

x1, x2, q1, q2

vector of quantiles.

n

number of observations. Same as runif

apar

the association parameter.

log

Logical. If TRUE then the logarithm is returned.

Details

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

Value

dbiamhcop gives the density, pbiamhcop gives the distribution function, and rbiamhcop generates random deviates (a two-column matrix).

Author(s)

T. W. Yee and C. S. Chee

See Also

biamhcop.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 x <- seq(0, 1, len = (N <- 101)); apar <- 0.7
ox <- expand.grid(x, x)
zedd <- dbiamhcop(ox[, 1], ox[, 2], apar = apar)
## Not run: 
contour(x, x, matrix(zedd, N, N), col = "blue")
zedd <- pbiamhcop(ox[, 1], ox[, 2], apar = apar)
contour(x, x, matrix(zedd, N, N), col = "blue")

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

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.