Betageom                package:VGAM                R Documentation

_T_h_e _B_e_t_a-_G_e_o_m_e_t_r_i_c _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
     beta-geometric distribution.

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

     dbetageom(x, shape1, shape2, log=FALSE)
     pbetageom(q, shape1, shape2, log.p=FALSE)
     rbetageom(n, shape1, shape2)

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

    x, q: vector of quantiles.

       n: number of observations. Must be a positive integer of length
          1.

shape1, shape2: the two (positive) shape parameters of the standard
          beta distribution. They are called 'a' and 'b' in 'beta'
          respectively.

log, log.p: Logical. If 'TRUE' then all probabilities 'p' are given as
          'log(p)'.

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

     The beta-geometric distribution is a geometric distribution whose
     probability of success is not a constant but it is generated from
     a beta distribution with parameters 'shape1' and 'shape2'. Note
     that the mean of this beta distribution is
     'shape1/(shape1+shape2)', which therefore is the mean of the
     probability of success.

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

     'dbetageom' gives the density, 'pbetageom' gives the distribution
     function, and 'rbetageom' generates random deviates.

_N_o_t_e:

     'pbetageom' can be particularly slow.

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

     T. W. Yee

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

     'geometric', 'betaff', 'Beta'.

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

     ## Not run: 
     shape1 = 1; shape2 = 2; y = 0:30
     proby = dbetageom(y, shape1, shape2, log=FALSE)
     plot(y, proby, type="h", col="blue", ylab="P[Y=y]",
          main=paste("Y ~ Beta-geometric(shape1=",shape1,", shape2=",shape2,")",
          sep=""))
     sum(proby)
     ## End(Not run)

