pbivpois               package:bivpois               R Documentation

_P_r_o_b_a_b_i_l_i_t_y _F_u_n_c_t_i_o_n _o_f _t_h_e _B_i_v_a_r_i_a_t_e _P_o_i_s_s_o_n _D_i_s_t_r_i_b_u_t_i_o_n

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

     Returns the probability the probability (or the log) of the
     bivariate poisson distribution for values x and y.

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

     pbivpois(x, y=NULL, lambda = c(1, 1, 1), log = FALSE)

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

       x: Matrix or Vector containing the data. If 'x' is a matrix then
          we consider as $x$ the first column and $y$ the second
          column.  Additional columns and 'y' are ignored.

       y: Vector containing the data of $y$. It is used only if 'x' is
          also a vector. Vectors 'x' and 'y' should be of equal length.

  lambda: Vector (of length 3) containing values of the parameters
          $lambda_1$, $lambda_2$ and $lambda_3$ of the bivariate
          Poisson distribution. 

     log: Logical argument for calculating the log probability or the
          probability function. The default value is 'FALSE'. 

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

     This function evaluates the probability function (or the log) of
     the bivariate Poisson distribution with parameters $lambda_1$,
     $lambda_2$ and $lambda_3$. Much faster than 'bivpois.table' since
     it avoid `for-loops' and does not use recursive relations.

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

     A vector of values of the probabilities of $PD(lambda_1, lambda_2,
     lambda_3)$ evaluated at $(x,y)$ when 'log=FALSE' or the
     log-probabilities of $PD(lambda_1, lambda_2, lambda_3)$ evaluated
     at $(x,y)$ when 'log=TRUE'.

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

     1.      Dimitris Karlis, Department of Statistics, Athens
     University of Economics and Business, Athens, Greece,
     karlis@aueb.gr .

     2.      Ioannis Ntzoufras, Department of Statistics, Athens
     University of Economics and Business, Athens, Greece,
     ntzoufras@aueb.gr  .

_R_e_f_e_r_e_n_c_e_s:

     1.      Karlis, D. and Ntzoufras, I. (2005). Bivariate Poisson and
     Diagonal Inflated Bivariate Poisson Regression Models in R.
     Journal of Statistical Software (to appear). 

     2.      Karlis, D. and Ntzoufras, I. (2003). Analysis of Sports
     Data Using Bivariate Poisson Models. Journal of the Royal
     Statistical Society, D, (Statistician), 52, 381 - 393.

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

     'bivpois.table', 'simple.bp', 'lm.bp', 'lm.dibp'.

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

     # probability function of (x,y)=(3,1) for lambda_1=1, lambda_2=1, lambda_3=1
     pbivpois(3, 1)                              
     # probability function of (x,y)=(3,1) for lambda_1=3, lambda_2=1, lambda_3=1
     pbivpois(3, 1, lambda=c(3,1,1))             
     # log-probability function of (x,y)=(3,1) for lambda_1=1, lambda_2=1, lambda_3=1
     pbivpois(3, 1, lambda=c(3,1,1), log=TRUE)   
     #
     # evaluates f(1,1), f(1,3) and f(3,1) for PD(2,1,0.2)
     pbivpois( c(1,3,1), c(1,1,3), c( 2,1,0.2 ) )               
     # same as above
     pbivpois( cbind(c(1,3,1), c(1,1,3)), lambda=c( 2,1,0.2 ) ) 

