Amh                   package:VGAM                   R Documentation

_A_l_i-_M_i_k_h_a_i_l-_H_a_q _D_i_s_t_r_i_b_u_t_i_o_n'_s _B_i_v_a_r_i_a_t_e _D_i_s_t_r_i_b_u_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

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.

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

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

_A_u_t_h_o_r(_s):

     T. W. Yee and C. S. Chee

_S_e_e _A_l_s_o:

     'amh'.

_E_x_a_m_p_l_e_s:

     x = seq(0, 1, len=(N <- 101))
     alpha = 0.7
     ox = expand.grid(x, x)
     z = damh(ox[,1], ox[,2], alpha=alpha)
     ## Not run: 
     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
     ## End(Not run)

