Learn R Programming

VGAM (version 0.9-0)

Amh: Ali-Mikhail-Haq Distribution's Bivariate Distribution

Description

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

Usage

damh(x1, x2, alpha, log = FALSE)
pamh(q1, q2, alpha)
ramh(n, alpha)

Arguments

x1, x2, q1, q2
vector of quantiles.
n
number of observations. Must be a positive integer of length 1.
alpha
the association parameter.
log
Logical. If TRUE then the logarithm is returned.

Value

  • damh gives the density, pamh gives the distribution function, and ramh generates random deviates (a two-column matrix).

Details

See amh, 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

amh.

Examples

Run this code
x = seq(0, 1, len=(N <- 101))
alpha = 0.7
ox = expand.grid(x, x)
z = damh(ox[,1], ox[,2], alpha=alpha)
contour(x, x, matrix(z, N, N), col="blue")
z = pamh(ox[,1], ox[,2], alpha=alpha)
contour(x, x, matrix(z, N, N), col="blue")

plot(r <- ramh(n=1000, alpha=alpha), 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