7.2
CiteScore
3.7
Impact Factor
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Filter by Categories
ABUNDANCE ESTIMATION IN AN ARID ENVIRONMENT
Case Study
Editorial
Invited review
Letter to the Editor
Original Article
REVIEW
Review Article
SHORT COMMUNICATION
7.2
CiteScore
3.7
Impact Factor
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Filter by Categories
ABUNDANCE ESTIMATION IN AN ARID ENVIRONMENT
Case Study
Editorial
Invited review
Letter to the Editor
Original Article
REVIEW
Review Article
SHORT COMMUNICATION
View/Download PDF

Translate this page into:

Original article
28 (
2
); 178-189
doi:
10.1016/j.jksus.2015.09.003

On bivariate Poisson regression models

Department of Mathematics and Statistics, King Faisal University, Saudi Arabia
Department of Statistics and Operations Research, King Saud University, Saudi Arabia

⁎Corresponding author. maomair@ksu.edu.sa (Maha A. Omair)

Disclaimer:
This article was originally published by Elsevier and was migrated to Scientific Scholar after the change of Publisher.
JBP: joint bivariate Poisson distribution.

Abstract

In this paper, we consider estimating the parameters of bivariate and zero-inflated bivariate Poisson regression models using the conditional method. This method is compared with the standard method, which uses the joint probability function. Simulations and real applications show that the two methods have almost identical Akaike Information Criteria and parameter estimates, but the conditional method has a much faster execution time than the joint method. We conducted our computations using the R and SAS package. Our results also indicate that the execution time of SAS is faster than that of R.

Keywords

Correlated count data
Conditional modeling
Bivariate Poisson distribution
Regression models
Zero-inflated models
1

1 Introduction

Joint modeling of two or more counts data has received a great deal of attention in recent years. Bivariate count models are used in cases where two count variables are correlated and need to be jointly estimated. For example, variables can include the number of emergency and non-emergency visits by a person to the hospital, the number of insurance claims with and without bodily injuries, or the number of voluntary and involuntary job changes.

The bivariate Poisson is the most widely used model for bivariate counts. It was proposed by Holgate (1964) and presented by Johnson and Kotz (1969). The definition of the bivariate Poisson distribution is not unique. Several approaches have been discussed by Kocherlakota and Kocherlakota (1992). Here, we adopt the trivariate reduction method to construct the distribution (Johnson et al., 1997). Consider three independent Poisson random variables, X k , k = 1 , 2 , 3 , with parameters (means) λ k > 0 , k = 1 , 2 , 3 . Then, the random variables Y 1 = X 1 + X 3 and Y 2 = X 2 + X 3 are set to follow joint bivariate Poisson distribution JBP11, λ2, λ3). The joint probability mass function (p.m.f) is given by

(1)
f JBP ( y 1 , y 2 ; λ 1 , λ 2 , λ 3 ) = e - ( λ 1 + λ 2 + λ 3 ) λ 1 y 1 y 1 ! λ 2 y 2 y 2 ! r = 0 min ( y 1 , y 2 ) y 1 r y 2 r r ! λ 3 λ 1 λ 2 r .

It can be easily shown that Y 1 and Y 2 are marginally distributed as Poisson with means λ 1 + λ 3 and λ 2 + λ 3 , respectively. The covariance of Y 1 and Y 2 is λ 3 , and hence, λ 3 is a measure of dependence between the two random variables. If λ 3 = 0 , then the two variables are independent and the bivariate Poisson distribution reduces to the product of two independent Poisson distributions (referred to as double Poisson distribution “DP”2).

By means of conditional probability theory, the joint density (1) can be written as the product of a marginal and a conditional distribution. Hence:

(2)
f ( y 1 , y 2 ) = f Y 2 Y 1 ( y 2 y 1 ) f Y 1 ( y 1 ) , or
(3)
f ( y 1 , y 2 ) = f Y 1 Y 2 ( y 1 y 2 ) f Y 2 ( y 2 ) .

In general, every decomposition of f ( y 1 , y 2 ) will lead to different marginal and conditional distributions.

Returning to Eq. (2), Y 1 is a Poisson distribution with parameter μ 1 = λ 1 + λ 3 and the conditional distribution of Y 2 given Y 1 is expressed as

(4)
f Y 2 Y 1 ( y 2 y 1 ) = r = 0 min ( y 1 , y 2 ) y 1 r p 1 r ( 1 - p 1 ) y 1 - r e - λ 2 λ 2 y 2 - r ( y 2 - r ) ! , where p 1 = λ 3 λ 3 + λ 1 .

The expression in (4) is a convolution of a Poisson variable with parameter λ 2 and a binomial with parameters ( y 1 , p 1 ) . The conditional mean and variance are given by: E ( Y 2 Y 1 ) = λ 2 + p 1 y 1 , Var ( Y 2 Y 1 ) = λ 2 + p 1 ( 1 - p 1 ) y 1 .

Hence, the joint p.m.f of conditional model 1 “CM1”3 given in (2):

(5)
f ( y 1 , y 2 ) = f Y 2 Y 1 ( y 2 y 1 ) f Y 1 ( y 1 ) = r = 0 min ( y 1 , y 2 ) y 1 r p 1 r ( 1 - p 1 ) y 1 - r e - λ 2 λ 2 y 2 - r ( y 2 - r ) ! e - μ 1 μ 1 y 1 y 1 ! = f CM1 ( y 1 , y 2 ; p 1 , λ 2 , μ 1 ) .

For this model Cov ( y 1 , y 2 ) = p 1 μ 1 . Hence, the covariance is zero if and only if p 1 = 0 (note that μ 1 = 0 correspond to the univariate case).

In the same way, Eq. (3) can be written as:

(6)
f ( y 1 , y 2 ) = f Y 1 Y 2 ( y 1 y 2 ) f Y 2 ( y 2 ) = r = 0 min ( y 1 , y 2 ) y 2 r p 2 r ( 1 - p 2 ) y 2 - r e - λ 1 λ 1 y 1 - r ( y 1 - r ) ! e - μ 2 μ 2 y 2 y 2 ! = f CM2 ( y 1 , y 2 ; p 2 , λ 1 , μ 2 ) , where p 2 = λ 3 λ 3 + λ 2 , and μ 2 = λ 2 + λ 3 .

Also, for this model Cov ( y 1 , y 2 ) = p 2 μ 2 . Hence, the covariance is zero if and only if p 2 = 0 .

Note that for CM1 and CM2, p 1 and p 2 play the same role as λ 3 in JBP.

The bivariate Poisson model was applied by King (1989) to the annual number of presidential vetoes of social welfare bills and defense bills, by Jung and Winkelmann (1993) to the number of voluntary and involuntary changes, and by Ozuna and Gomez (1994) to the number of trips to different recreational sites. They model the marginal expectation of Y 1 and Y 2 as a log linear function of explanatory variables.

The disadvantage of this particular model is that it does not allow for over/under dispersion (the marginal distributions are Poisson) or negative correlation, and thus lacks generality. For the case of over-dispersed count data, the mixed Poisson models are potentially useful (Bermúdez and Karlis, 2012; Ghitany et al., 2012; Gurmu and Elder, 2000; Munkin and Trivedi, 1999). There are also some other models that allow for negative correlation (Berkhout and Plug, 2004; Chib and Winkelmann, 2001; Gurmu and Elder, 2008; Karlis and Meligkotsidou, 2007; Van Ophem, 1999).

It is clear that there are one-to-one transformations between the parameters of the three representations of the bivariate Poisson distribution. Hence, according to the maximum likelihood invariance principle, we obtain identical estimates of the parameters no matter which representation has been used. It will be of interest to see whether such an invariance property holds when we have explanatory variables.

In this paper, we compare fitting a bivariate Poisson regression model using both the joint and conditional arguments described above. We also consider the inflated versions of these models to allow for over-dispersion and discuss inferences related to the parameters involved in the models and the execution times, using SAS and R software.

The outline of the paper is as follows. In Section 2, we present the bivariate Poisson regression model and discuss the estimation procedure using both the joint and conditional procedures. In Section 3, we discuss the zero-inflation version of the joint bivariate Poisson regression model and the proposed conditional models. In Section 4, a simulation study is conducted to compare the three models. In Section 5, applications on two data sets from Australia and Saudi Arabia are illustrated using the considered bivariate regression models. Finally, some concluding remarks are provided in Section 6.

2

2 Bivariate Poisson regression model

Here, we assume that the parameters of the models depend on explanatory variables. In the joint bivariate Poisson regression model “JBPM”4, λ k > 0 with k = 1, 2 and 3 can be related to various explanatory variables using the classical exponential link functions. Therefore, the joint bivariate Poisson regression model can take the following form:

(7)
( Y 1 i , Y 2 i ) JBP ( λ 1 i , λ 2 i , λ 3 i ) log λ ki = w i T α k , k = 1 , 2 , 3 , where i = 1 , 2 , , n denotes the observation number, w i denotes a vector of explanatory variables of length l for the i-th observation related to the k-th parameter and α k is the corresponding vector of regression coefficients.

In the case of the explanatory variables, two aspects should be stressed. First, different covariates can be used to model each parameter (or same covariates) and second, covariates can be introduced to model λ 3 in order to learn more about the influence of the covariates on each pair of variables (or, to facilitate interpretation, no covariates are used to model λ 3 ).

Gourieroux et al. (1984) derived pseudo maximum likelihood estimation methods. Jung and Winkelmann (1993) and Kocherlakota and Kocherlakota (2001) considered the joint bivariate Poisson regression model using a Newton–Raphson procedure. Karlis and Ntzoufras (2005) constructed an EM algorithm to remedy convergence problems encountered with the Newton Raphson procedure. Ho and Singer (2001) proposed a generalized least squares method for maximizing the log likelihood. Karlis and Tsiamyrtzis (2008) implemented a Bayesian inference that does not rely on the MCMC scheme. Tsionas (2001), Ma and Kockelman (2006) and Choe et al. (2012) considered a Bayesian approach based on the MCMC technique to execute some computations.

Here we use the maximum likelihood method for estimating the parameters. Consider independent observations ( y 1 i , y 2 i ) with the i-th vector having the join bivariate Poisson distribution f ( y 1 i , y 2 i ) = e - ( λ 1 i + λ 2 i + λ 3 i ) φ ( y 1 i , y 2 i ) where φ ( y 1 i , y 2 i ) = r = 0 min ( y 1 i , y 2 i ) λ 3 i r λ 1 i ( y 1 i - r ) λ 2 i ( y 2 i - r ) r ! ( y 1 i - r ) ! ( y 2 i - r ) ! .

Then, the corresponding score functions U kj = log L α kj , k = 1 , 2 , 3 ; j = 0 , 1 , , l are U 1 j = i = 1 n λ 1 i w ji φ ( y 1 i - 1 , y 2 i ) φ ( y 1 i , y 2 i ) - 1 , U 2 j = i = 1 n λ 2 i w ji φ ( y 1 i , y 2 i - 1 ) φ ( y 1 i , y 2 i ) - 1 , U 3 j = i = 1 n λ 3 i w ji φ ( y 1 i - 1 , y 2 i - 1 ) φ ( y 1 i , y 2 i ) - 1 .

For the conditional Poisson regression models, we will only consider the first conditional model (CM1), as the argument for the second conditional model (CM2) is the same. The likelihood of CM1 can be written as the product of two likelihoods; the first one is that of the conditional model and the second is that of the marginal model. Hence, assuming that the regression parameters are different, one can maximize each likelihood separately with respect to the corresponding parameters. For the CM1 we denote the parameters by β k , k = 1 , 2 , 3 .

For the marginal Poisson regression model, let μ 1 i be the mean of Y 1 i , i = 1 , 2 , , n . Then, using the standard Poisson regression model, we set:

(8)
log μ 1 i = β 10 + j = 1 l β 1 j w ji , i = 1 , 2 , , n .

For the conditional regression model, the conditional density (4) of Y 2 i Y 1 i , i = 1 , 2 , , n involves the parameters p 1 i and λ 2 i . We use the following link functions:

(9)
log λ 2 i = β 20 + j = 1 l β 2 j w ji , i = 1 , 2 , , n .
(10)
logit ( p 1 i ) = β 30 + j = 1 l β 3 j w ji , i = 1 , 2 , , n ,

The score functions V kj = log L β kj , k = 1 , 2 , 3 ; j = 0 , 1 , , l for each regression parameters are summarized as follows:

(11)
V 1 j = i = 1 n [ y 1 i - μ 1 i ] w ji , V 2 j = i = 1 n - λ 2 i + y 2 i - 1 f Y 2 i Y 1 i ( y 2 i y 1 i ) r = 0 min ( y 1 i , y 2 i ) r y 1 i r p 1 i r ( 1 - p 1 i ) y 1 i - r e - λ 2 i λ 2 i y 2 i - r ( y 2 i - r ) ! w ji V 3 j = i = 1 n - y 1 i p 1 i + 1 f Y 2 i Y 1 i ( y 2 i y 1 i ) r = 0 min ( y 1 i , y 2 i ) r y 1 i r p 1 i r ( 1 - p 1 i ) y 1 i - r e - λ 2 i λ 2 i y 2 i - r ( y 2 i - r ) ! w ji ; j = 0 , 1 , , l .

By equating the score functions in (11) to zero, one can obtain the parameter estimates directly. We note that the likelihood equations are non-linear and do not have a closed-form solution, so they can be solved numerically.

The following theorem gives the relations between the score functions of JBPM and CM1.

Theorem 1

(12)
V 1 j = U 1 j + U 3 j
(13)
V 2 j = U 2 j
(14)
V 3 j = U 3 j - U 1 j
Proof: See the Appendix I.

Note that when we set U kj = 0 for all k = 1 , 2 , 3 and j = 0 , 1 , , l we get V kj = 0 , for all k = 1 , 2 , 3 and j = 0 , 1 , , l and vice versa. This shows that the likelihood invariance property holds when we have explanatory variables.

3

3 A bivariate zero-inflated model

The zero-inflated model is used when a count data set shows a large proportion of zeros. A bivariate zero-inflated model can be constructed by increasing the probability of the event ( y 1 = 0 , y 2 = 0 ) and decreasing the other joint probabilities.

The zero-inflated joint bivariate Poisson model “ZIJBPM”5 is specified by the probability function:

(15)
f ZIJBPM ( y 1 , y 2 ) = π + ( 1 - π ) f JBP ( 0 , 0 ; λ 1 , λ 2 , λ 3 ) y 1 = y 2 = 0 ( 1 - π ) f JBP ( y 1 , y 2 ; λ 1 , λ 2 , λ 3 ) y 1 or y 2 0 , where f JBP ( y 1 , y 2 ; λ 1 , λ 2 , λ 3 ) is the joint probability function given in (1) and 0 < π < 1 is the mixing proportion.

This model was proposed by Karlis and Ntzoufras (2003, 2005) in order to allow for over-dispersion of the corresponding marginal distributions. It was applied by Wang et al. (2003) to analyze two types of occupational injuries and by Bermúdez (2009) in the automobile insurance context for a bivariate case.

One can easily see that the marginal distributions are no longer simple Poisson distributions, but are now zero-inflated versions. Note that one may define more complicated models by assuming other kinds of inflations (Karlis and Ntzoufras, 2005). Moreover, one may add covariates to π , implying that inflation depends on external factors.

For estimation of the parameters of ZIJBPM, we use the maximum likelihood procedure as follows. Let ( y 1 i , y 2 i ) , i = 1 , 2 , , n be a random sample observed from ZIJBPM. The likelihood function for the observed random sample is given by: L ( π i , λ 1 i , λ 2 i , λ 3 i ; y 1 i , y 2 i ) = i = 1 n { ( π i + ( 1 - π i ) f JBP ( 0 , 0 ; λ 1 i , λ 2 i , λ 3 i ) ) 1 - a i ( ( 1 - π i ) f JBP ( y 1 i , y 2 i ; λ 1 i , λ 2 i , λ 3 i ) ) a i } , where a i = 1 if ( y 1 i , y 2 i ) ( 0 , 0 ) and a i = 0 otherwise. In order to fit this model, we used the link functions in (7) for λ ki , and for modeling the mixing proportion π i , we used a logit link function: logit ( π i ) = γ 0 + j = 1 l γ j w ji .

The maximum likelihood estimates (MLEs) of the parameters can be obtained by solving equations log L α 1 j = 0 , log L α 2 j = 0 , log L α 3 j = 0 and log L γ j = 0 for j = 0 , 1 , , l , simultaneously.

The zero-inflated conditional model “ZICM”6 is given by:

(16)
f ZICM ( y 1 , y 2 ) = π + ( 1 - π ) f CM ( 0 , 0 ; p , λ , μ ) y 1 = y 2 = 0 ( 1 - π ) f CM ( y 1 , y 2 ; p , λ , μ ) y 1 or y 2 0 where f CM ( y 1 , y 2 ) is the joint p.m.f of the conditional model given in (5) or (6) and π is the mixing proportion.

For parameter estimations of ZICM1, let ( y 1 i , y 2 i ) , i = 1 , 2 , , n be a random sample observed from ZICM1. The likelihood function for the observed random sample is given by L ( π i , λ 1 i , λ 2 i , λ 3 i ; y 1 i , y 2 i ) = i = 1 n { ( π i + ( 1 - π i ) f CM1 ( 0 , 0 ; p 1 i , λ 2 i , μ 1 i ) ) 1 - a i ( ( 1 - π i ) f CM1 ( y 1 i , y 2 i ; p 1 i , λ 2 i , μ 1 i ) ) a i } , where a i = 1 if ( y 1 i , y 2 i ) ( 0 , 0 ) and a i = 0 otherwise. In order to fit this model, we used the link functions, as in (8)–(10), for μ 1 i , λ 2 i and p 1 i , respectively, and to model the mixing proportion π i , we used a logit link function: logit ( π i ) = γ 0 + j = 1 l γ j w ji .

The MLEs of the parameters can be obtained by solving equations log L β 1 j = 0 , log L β 2 j = 0 , LogL β 3 j = 0 and LogL γ j = 0 for j = 0 , 1 , , l , simultaneously.

4

4 Experiment results

We conducted a simulation study to examine the performance of the proposed conditional model compared with that of the joint bivariate Poisson model and the double Poisson model. We used three variables, namely gender, age and income from Health Care Australian data (Cameron et al., 1988) as covariates. For each of the following four cases we generated 1000 samples each of size 5190.

Case 1. Simulation from joint bivariate Poisson model.

We have simulated the data points ( y 1 i , y 2 i ) from the joint bivariate Poisson regression model with λ 1 i , λ 2 i , λ 3 i given by: λ 1 i = exp ( α 10 + α 11 w 1 i + α 12 w 2 i + α 13 w 3 i ) , λ 2 i = exp ( α 20 + α 21 w 1 i + α 22 w 2 i + α 23 w 3 i ) , λ 3 i = exp ( α 30 + α 31 w 1 i + α 32 w 2 i + α 33 w 3 i ) .

We have used the following parameter values: α 10 = - 1.9983 , α 11 = 0.2268 , α 12 = 0.6902 , α 13 = - 0.2004 , α 20 = - 2.1718 , α 21 = 0.6436 , α 22 = 3.1092 , α 23 = - 0.07716 , α 30 = - 3.0328 , α 31 = 0.1966 , α 32 = 2.1272 , α 33 = - 0.3984 .

Case 2. Simulation from conditional model.

We generated the data points ( y 1 i , y 2 i ) from the conditional regression model 1, assuming the following: μ 1 i = exp ( β 10 + β 11 w 1 i + β 12 w 2 i + β 13 w 3 i ) . λ 2 i = exp ( β 20 + β 21 w 1 i + β 22 w 2 i + β 23 w 3 i ) , logit ( p 1 i ) = β 30 + β 31 w 1 i + β 32 w 2 i + β 33 w 3 i .

Then, λ 3 i = p 1 i μ 1 i , λ 1 i = μ 1 i - λ 3 i .

We have used the following parameter values: β 10 = - 1.71473 , β 11 = 0.21565 , β 12 = 1.23798 , β 13 = - 0.27726 , β 20 = - 2.1658 , β 21 = 0.6316 , β 22 = 3.1162 , β 23 = - 0.08287 , β 30 = - 1.2005 , β 31 = 0.1642 , β 32 = 1.4778 , β 33 = - 0.08393 .

Case 3. Simulation from zero-inflated joint bivariate Poisson model.

We have simulated the data points ( y 1 i , y 2 i ) from the zero-inflated joint bivariate Poisson regression model with λ 1 i , λ 2 i , λ 3 i and π i given by: λ 1 i = exp ( α 10 + α 11 w 1 i + α 12 w 2 i + α 13 w 3 i ) , λ 2 i = exp ( α 20 + α 21 w 1 i + α 22 w 2 i + α 23 w 3 i ) , λ 3 i = exp ( α 30 + α 31 w 1 i + α 32 w 2 i + α 33 w 3 i ) , logit ( π i ) = γ .

We have used the following parameter values: α 10 = - 1.4601 , α 11 = 0.2223 , α 12 = 0.7534 , α 13 = - 0.1644 , α 20 = - 1.6012 , α 21 = 0.5709 , α 22 = 2.8359 , α 23 = - 0.03434 , α 30 = - 2.7627 , α 31 = - 0.2254 , α 32 = 1.9464 , α 33 = - 0.5794 , γ = - 0.7853 .

Case 4. Simulation from zero-inflated conditional model.

We generated the data points ( y 1 i , y 2 i ) from the zero-inflated conditional regression model 1, assuming the following: μ 1 i = exp ( β 10 + β 11 w 1 i + β 12 w 2 i + β 13 w 3 i ) . λ 2 i = exp ( β 20 + β 21 w 1 i + β 22 w 2 i + β 23 w 3 i ) , logit ( p 1 i ) = β 30 + β 31 w 1 i + β 32 w 2 i + β 33 w 3 i ,logit ( π i ) = γ .

Then, λ 3 i = p 1 i * μ 1 i , λ 1 i = μ 1 i - λ 3 i .

We have used the following parameter values: β 10 = - 1.2134 , β 11 = 0.1149 , β 12 = 1.034 , β 13 = - 0.257 , β 20 = - 1.6096 , β 21 = 0.5437 , β 22 = 2.8886 , β 23 = - 0.04059 , β 30 = - 1.2839 , β 31 = - 0.1031 , β 32 = 0.6529 , β 33 = - 0.2774 , γ = - 0.789 .

Table 1 illustrates the means and standard deviations of the AIC for the fitted models under the four cases. Bias and mean square error (MSE) of the estimated parameters are presented in Table 2. Table 1 shows that the average values of the AIC for the joint bivariate Poisson model are almost identical with those obtained from conditional model 1 irrespective of the mechanism of data generations. On the other hand, when the data are generated from zero-inflated models, the fitted models ZIDPM, ZIJBP and ZICM1 perform better than their non-inflated counter parts, as expected.

Table 1 Mean and standard deviation (between brackets) of the AIC results of fitted models for simulated data.
Model Case 1 of simulation Case 2 of simulation Case 3 of simulation Case 4 of simulation
Non Inflated Models Double Poisson Model (DPM) 18,329.47
(173.721)
18,326.61
(172.173)
19,489.94
(195.289)
13,011.69
(262.769)
Joint bivariate Poisson Model (JBPM) 18,087.63
(172.2957)
18,083.14
(170.814)
19,016.7
(195.479)
12,182.46
(244.162)
Conditional Model 1 (CM1) 18,081.69
(172.263)
18,077.37
(170.517)
19,009.95
(195.799)
12,179.54
(243.163)
Zero Inflated Models Zero Inflated Double Poisson Model (ZIDPM) 18,308.27
(170.587)
18,303.82
(169.269)
18,339.16
(189.619)
10,643.36
(220.716)
Zero Inflated Joint bivariate Poisson Model (ZIJBPM) 18,079.63
(172.29)
18,075.14
(170.814)
18,241.29
(189.959)
10,537.24
(220.085)
Zero Inflated Conditional Model 1(ZICM1) 18,079.82
(172.29)
18,070.19
(170.819)
18,241.37
(189.955)
10,535.97
(220.005)
Table 2 Bias and MSE of the estimated parameters.
Model True
α
α 10 α 11 α 12 α 13 α 20 α 21 α 22 α 23 α 30 α 31 α 32 α 33 γ
JBPM −1.9983 0.2268 0.6902 −0.2004 −2.1718 0.6436 3.1092 −0.07716 −3.0328 0.1966 2.1272 −0.3984
Bias −0.0047 −1.3E−05 −0.0061 0.0006 0.0019 −0.0028 0.0007 −0.0076 −0.0031 0.0012 −0.01491 −0.0137
MSE 0.0181 0.0083 0.0494 0.0138 0.0068 0.0019 0.0109 0.00289 0.0482 0.0145 0.091591 0.0379
CM1 True
β
β 10 β 11 β 12 β 13 β 20 β 21 β 22 β 23 β 30 β 31 β 32 β 33 γ
−1.71473 0.21565 1.23798 −0.27726 −2.1658 0.6316 3.1162 −0.08287 −1.2005 0.1642 1.4778 −0.08393
Bias −0.00202 −0.00402 0.007261 0.000424 0.00138 −0.00262 0.001554 −0.00681 0.002381 0.039676 −0.01463 −0.01341
MSE 0.008372 0.003128 0.016076 0.006666 0.006894 0.001941 0.010943 0.003058 0.091696 0.02406 0.088024 0.00018
ZIBPM True
α
α 10 α 11 α 12 α 13 α 20 α 21 α 22 α 23 α 30 α 31 α 32 α 33 γ
−1.4601 0.2223 0.7534 −0.1644 −1.6012 0.5709 2.8359 −0.03434 −2.7627 −0.2254 1.9464 −0.5794 −0.7853
Bias 0.0051 −3E−05 −0.0189 −0.0167 −0.0025 0.0023 −0.0008 −0.0251 −0.00176 −0.0589 −0.01071 −0.00569 −0.0037
MSE 0.0206 0.0089 0.0591 0.0131 0.0083 0.0025 0.0135 0.0027 0.072317 0.0489 0.077094 0.084767 0.0027
ZICM1 True
β
β 10 β 11 β 12 β 13 β 20 β 21 β 22 β 23 β 30 β 31 β 32 β 33 γ
−1.2134 0.1149 1.034 −0.257 −1.6096 0.5437 2.8886 −0.04058 −1.2839 −0.1031 0.6529 −0.2774 −0.789
Bias 0.109267 0.146683 −0.11928 −0.00371 −0.00103 0.000364 0.002026 −0.05032 0.068698 −0.02123 0.237688 0.018441 0.002686
MSE 0.031875 0.036202 0.056103 0.015156 0.021908 0.006418 0.04057 0.00741 0.024504 0.006395 0.091596 0.014975 0.002135

To perform official test for the hypothesis that there is no significant difference of the AIC’s, we preformed Vuong test. Vuong (1989) set the information criterion in a testing framework in which the null hypothesis is that the two competing models are equally close to the true model. Under the null hypothesis that the models are indistinguishable, the test statistic is asymptotically distributed standard normal. We applied the Vuong test to investigate if there is statistically significant difference between the joint bivariate Poisson model and the conditional model 1 in terms of AICs. We also performed the test to compare the zero inflated models. In all cases the Vuong test confirmed that there is no significant difference between the two models. The smallest p-value obtained was 0.529. Both models always perform better than the double Poisson model.

In general, the simulation study confirmed the expected similarity of the results obtained under joint and conditional bivariate Poisson models. This concludes the invariance property holds when we have explanatory variables as expected from the results of Theorem 1.

5

5 Applications

5.1

5.1 First application

The data analyzed here were originally employed by Cameron et al. (1988) in their analysis of various measures of health-care utilization, using a sample of 5190 single-person households from the 1977–1978 Australian Health Survey. The data were obtained from the Journal of Applied Econometrics 1997 data archive.

Here, we model two possibly jointly dependent variables of health service utilization measures: (1) the number of consultations with doctors during the two-week period prior to the survey ( Y 1 ); and (2) the number of prescribed medicines used in the past 2 days ( Y 2 ).Three variables have been used as covariates, namely gender (1 female, 0 male), age in years divided by 100 (measured as midpoints of age groups) and the annual income in Australian dollars divided by 1000 (measured as midpoint of coded ranges). More details on the data can be found in Cameron et al. (1988).

We have fitted four different models for: joint bivariate Poisson, conditional models 1 and 2, zero-inflated joint bivariate Poisson and zero-inflated conditional Poisson models 1 and 2.

  • Model (A) covariates: age, gender, income and age * gender with gender as a covariate on the covariance term.

  • Model (B) covariates: age, gender, income and age * gender with a constant covariance term.

  • Model (C) covariates: age, gender and income with gender as a covariate on the covariance term.

  • Model (D) covariates: age, gender and income with a constant covariance term.

For the double Poisson and zero-inflated double Poisson, we fitted models (A) and (C) without the covariance term.

“PROC NLMIXED” and “rootSolve” in SAS and R, respectively, were used in fitting these models. Both packages yielded the same results.

Tables 3 and 4 summarize the model details and the fit of the bivariate models in terms of the AIC (Akaike Information Criteria), number of parameters estimated and the execution time required to fit the models using SAS and R packages. The results show that the execution time of the conditional argument is less than that of the joint model argument using SAS and R.

Table 3 Model evaluation statistics of Bivariate Models for Health Care Australia data.
Model Evaluation criterion SAS execution time (s) R execution time (s)
Par. AIC
Double Poisson Model (DPM) A 10 20325.5 0.050 0.1
C 8 20482.0 0.048 0.08
Joint bivariate Poisson Model (JBPM) A 12 19913.0 1.380 19.746
B 11 19942.0 1.180 18.530
C 10 20051.0 0.650 17.404
D 9 20079.0 0.700 15.850
Conditional Model 1 (CM1) A 12 19863.5 0.560 7.402
B 11 19864.5 0.560 6.639
C 10 20007.4 0.470 6.738
D 9 20009.4 0.440 5.694
Conditional Model 2 (CM2) A 12 19865.4 0.560 8.114
B 11 19878.8 0.590 7.308
C 10 20003.9 0.513 7.228
D 9 20022.5 0.500 6.466
Table 4 Model evaluation statistics of Zero-Inflated Bivariate Models for Health Care Australia data.
Model Evaluation criterion SAS execution time (s) R execution time (s)
Par. AIC
Zero Inflated Double Poisson Model (ZIDPM) A 11 19,306 0.56 7.899
C 9 19,438 0.48 7.032
Zero Inflated Joint bivariate Poisson Model(ZIJBPM) A 13 19,199 1.63 37.533
B 12 19,193 1.46 34.389
C 11 19,334 1.07 28.821
D 10 19,332 0.73 26.508
Zero Inflated Conditional Model 1(ZICM1) A 13 19,101 1.40 23.827
B 12 19,100 1.20 22.252
C 11 19,252 1.06 17.663
D 10 19250.1 0.64 16.031
Zero Inflated Conditional Model 2(ZICM2) A 13 19,114 1.62 22.930
B 12 19,127 1.32 20.948
C 11 19,251.8 1.01 21.722
D 10 19,270.4 0.71 19.177

Table 3 indicates that estimating the two count events jointly is better than estimating the two count events independently.

The model evaluation statistics for zero-inflated bivariate count regression models are reported in Table 4. Since almost 54% of all observations occur when doctor visits and the number of prescribed medicines are zero, a zero-inflated model would be more appropriate. In comparing the model evaluation criterion for Tables 3 and 4, one can conclude that the zero-inflated bivariate models perform better than their counterparts in Table 3.

In comparing the AIC values of conditional models 1 and 2 with the corresponding values of the joint bivariate Poisson, we observed that the results are essentially the same. This is also confirmed using Vuong test. It turns out that all of the estimates are practically identical across all three alternative models. Hence, we can conclude that the proposed conditional model is equivalent to the joint model and computationally simpler.

We found the best model, which includes all significant parameters and has the smallest AIC, is model (C) of the conditional model 2. An analysis of the maximum likelihood parameter estimates derived for this model is provided in Table 5.

Table 5 Results from fitting the conditional model 2 to the Health Care Australia data.
Model (C)
Results from the fitted conditional model f Y 1 Y 2 ( y 1 y 2 )
Parameter Covariate Coef. St.Er. Pr>|t|
λ 1 Constant −1.8919 0.1201 <.0001
Gender 0.2851 0.08408 0.0007
Age 0.4500 0.1893 0.0175
Income −0.2581 0.1097 0.0187
p 2 Constant −1.4588 0.09368 <.0001
Gender −0.5783 0.1244 <.0001
No. Parameter 6
Log-likelihood −3641.95
AIC 7295.9
BIC 7335.2
Results from the fitted Poisson model f Y 2 ( y 2 )
Parameter Covariate Coef. St.Er. Pr > ChiSq
μ 2 Constant −1.87209 0.06550 <.0001
Gender 0.57601 0.03638 <.0001
Age 2.96270 0.08570 <.0001
Income −0.12539 0.05058 0.0132
No. Parameter 4
Log-likelihood −6349.994
AIC 12707.9879
BIC 12734.2058
Final results from the fitted model f Y 1 Y 2 ( y 1 y 2 ) f Y 2 ( y 2 )
No. Parameter 10
Log-likelihood −9991.944
AIC 20,003.8879
BIC 20,069.4058

5.2

5.2 Second application

The data set was obtained from Dallah Hospital at Riyadh for 5000 persons insured directly at the hospital. At Dallah Hospital, there are three types of clinics: consultation clinics with appointments (CONS), open specialist clinics without appointments (OSC) and emergency clinics (AE). Here, we will consider joint modeling of the number of patient visits to the consultation clinics ( Y 1 ) and to the open specialty clinics ( Y 2 ) during the year 2011. The explanatory variables are age and gender. The sample correlation coefficient between the two variables is 0.347. The percentage of zero visits to the CONS and OSC clinics is 39.68% and 32.82%, respectively. Descriptive statistics for these variables are given in Table 6.

Table 6 Summary statistics of Dallah data.
Statistic Number Mean St. dev Median Minimum Maximum
CONS 5000 2.8794 4.8740 1 0 57
OSC 5000 4.1154 5.6395 2 0 49
Age 5000 34.1340 23.2540 32 0 102
Gender 5000 0.5082 0.5000 1 0 1

We have used different groups of covariates. In model (A), we used age and gender as covariates. Model (B): age, gender and age * gender. Model (C): age, age2 and gender. Model (D): age, age2, gender and age * gender. Model (E): age, age2, gender, age * gender and age2 * gender. In model (F), we classified the age into groups (<5, 5–10, 11–15, 16–20, 21–25, 26–30, 31–35, 36–40, 41–45, 46–50, 51–55, 56–60, 61–65, >66) and used gender and age groups as covariates.

The model evaluation statistics for joint and conditional Poisson models 1 and 2 regarding AIC, the number of parameters estimated and the execution time required to fit the models using SAS and R packages are listed in Table 7, and those for zero-inflated are reported in Table 8. Most of the results of the joint bivariate Poisson model agree with the results of conditional models 1 and 2.

Table 7 Model evaluation statistics of Bivariate Models for Dallah data.
Model Evaluation criterion SAS execution time (s) R execution time (s)
Par. AIC
Double Poisson Model (DPM) A 6 67,899.88 0.1 0.775
B 8 67,885.72 0.1 0.679
C 8 65,676.05 0.1 0.739
D 10 65,677.3 0.08 0.683
E 12 65,630.9 0.1 0.729
F 30 65,108.56 0.15 0.846
Joint bivariate Poisson Model (JBPM) A 9 66,908 0.89 8.378
B 12 66,894 2.20 9.568
C 12 64,758 2.66 11.861
D 15 64,759 3.83 14.842
E 18 64,716 5.49 43.014
F 45 64,189 15.60 51.042
Conditional Model 1 (CM1) A 9 66,904.89 0.64 3.302
B 12 66,891.33 0.89 3.99
C 12 64,713.41 0.97 4.164
D 15 64,714.25 1.17 4.728
E 18 64,677.63 2.94 5.25
F 45 64,190.71 5.76 6.118
Conditional Model 2 (CM2) A 9 66,882.99 0.85 4.057
B 12 66,868.39 1.1 5.66
C 12 64,759.65 1.19 5.98
D 15 64,759.04 1.39 6.099
E 18 64,715.27 2.19 9.319
F 45 64,190.85 6.33 11.3
Table 8 Model evaluation statistics of Zero-Inflated Bivariate Models for Dallah data.
Model Evaluation criterion SAS execution time (s) R execution time (s)
Par. AIC
Zero Inflated Double Poisson Model (ZIDPM) A 7 64,419 0.29 10.495
B 9 64,412 0.34 12.199
C 9 62,908 0.37 13.286
D 11 62,911 0.50 15.104
E 13 62,868 0.65 16.151
F 31 62,473 1.01 19.542
Zero Inflated Joint bivariate Poisson Model (ZIJBPM) A 10 63,898 1.23 12.757
B 13 64,067 3.07 30.02
C 13 62,355 3.54 32.910
D 16 62,358 5.47 42.003
E 19 62,513 4.89 45.723
F 46 61,905 23.22 68.4
Zero Inflated Conditional Model 1 (ZICM1) A 10 63,896 1.10 6.237
B 13 64,066 2.83 7.830
C 13 62,916 2.66 8.084
D 16 62,921 3.47 9.741
E 19 62,499 5.83 11.839
F 46 61,913 17.78 14.483
Zero Inflated Conditional Model 2 (ZICM2) A 10 63,897 1.29 8.397
B 13 63,890 2.97 10.302
C 13 62,358 3.40 10.187
D 16 62,358 4.63 11.788
E 19 62,320 5.61 13.902
F 46 61,913 15.78 14.590

We found the best model, which includes all significant parameters and has the smallest AIC, is model (A) of the zero-inflated conditional model 1. This fitted model is listed in Table 9.

Table 9 Results from fitting the zero inflated conditional model 1 to the Dallah data.
Parameter Covariate Model (A)
Coef. St. Er. Pr>|t|
μ 1 Constant 0.47620 0.022040 <.0001
Age 0.01580 0.000382 <.0001
Gender 0.17770 0.016970 <.0001
λ 2 Constant 0.37220 0.022880 <.0001
Age 0.02437 0.000364 <.0001
Gender 0.08910 0.017470 <.0001
p 1 Constant −2.43820 0.126900 <.0001
Age 0.00942 0.001765 <.0001
Gender 0.28040 0.115200 0.0150
Mixing proportion Constant −1.69170 0.041470 <.0001
No. Parameter 10
Log-likelihood −31,938
AIC 63,896
BIC 63,961

6

6 Conclusion

In this paper, we used conditional argument to introduce a two-stage procedure for estimating the bivariate Poisson regression model. Our study showed that this method has the same performance as that of using the joint density. The conditional method is simple as it partitions the joint likelihood into two univariate likelihoods. We also applied the two methods to two sets of real data. The conclusion is that the two ways of modeling have the same AIC but the execution times for the two-stage models are shorter.

Acknowledgments

This Project was funded by the National Plan for Science, Technology and Innovation (MAARIFAH), King Abdulaziz City for Science and Technology, Kingdom of Saudi Arabia, Award Number (11-MAT1856-02). The authors thank the referees for their constructive comments.

References

  1. , , . A bivariate Poisson count data model using conditional probabilities. Stat. Neerl.. 2004;58:349-364.
    [Google Scholar]
  2. , . A priori ratemaking using bivariate Poisson regression models. Insurance Math. Econom.. 2009;44:135-141.
    [Google Scholar]
  3. , , . A finite mixture of bivariate Poisson regression models with an application to insurance ratemaking. Comput. Stat. Data Anal.. 2012;56:3988-3999.
    [Google Scholar]
  4. , , , , . A microeconometric model of the demand for health care and health insurance in Australia. Rev. Econ. Stud.. 1988;55:85-106.
    [Google Scholar]
  5. , , . Markov chain Monte Carlo analysis of correlated count data. J. Bus. Econ. Statist.. 2001;19:428-435.
    [Google Scholar]
  6. , , , , , . Bayesian analysis for the bivariate Poisson regression model: applications to road safety countermeasures. J. Korean Data Inf. Sci. Soc.. 2012;23:851-858.
    [Google Scholar]
  7. , , , , . An EM algorithm for multivariate mixed Poisson regression models and its application. Appl. Math. Sci.. 2012;6:6843-6856.
    [Google Scholar]
  8. , , , . Pseudo maximum likelihood methods: applications to Poisson models. Econometrica. 1984;52:701-720.
    [Google Scholar]
  9. , , . Generalized bivariate count data regression models. Econometr. Lett.. 2000;68:31-36.
    [Google Scholar]
  10. , , . A bivariate zero-inflated count data regression model with unrestricted correlation. Econom. Lett.. 2008;100:245-248.
    [Google Scholar]
  11. , , . Generalized least squares methods for bivariate Poisson regression. Commun. Statist. Theory Method. 2001;30:263-277.
    [Google Scholar]
  12. , . Estimation for the bivariate Poisson distribution. Biometrika. 1964;51:241-245.
    [Google Scholar]
  13. , , , . Discrete Multivariate Distributions. New York: John Wiley & Sons; .
  14. , , . Discrete Distributions. New York: John Wiley & Sons; .
  15. , , . Two aspects of labor mobility: a bivariate Poisson regression approach. Empir. Econom.. 1993;18:543-556.
    [Google Scholar]
  16. , , . Finite mixtures of multivariate Poisson distributions with application. J. Statist. Plann. Inference. 2007;137:1942-1960.
    [Google Scholar]
  17. , , . Analysis of sports data by using bivariate Poisson models. Statistician. 2003;52:381-393.
    [Google Scholar]
  18. , , . Bivariate Poisson and diagonal inflated bivariate Poisson regression models in R. J. Stat. Softw.. 2005;14:1-36.
    [Google Scholar]
  19. , , . Exact Bayesian modeling for bivariate Poisson data and extensions. Statist. Comput.. 2008;18:27-40.
    [Google Scholar]
  20. , . A seemingly unrelated Poisson regression model. Sociol. Methods Res.. 1989;17:235-255.
    [Google Scholar]
  21. , , . Bivariate Discrete Distributions. New York: Marcel Dekker; .
  22. , , . Regression in the bivariate Poisson distribution. Commun. Statist. Theory Method. 2001;30:815-825.
    [Google Scholar]
  23. , , . Bayesian multivariate Poisson regression for models of injury count, by severity. In: Transportation Research Record: Journal of the Transportation Research Board, No. 1950. Washington, DC: Transportation Research Board of the National Academies; . p. :24-34.
    [Google Scholar]
  24. , , . Simulated maximum likelihood estimation of multivariate mixed-Poisson regression models, with application. The Econometrics Journal. 1999;2:29-48.
    [Google Scholar]
  25. , , . Estimating a system of recreation demand functions using a seemingly unrelated poisson regression approach. The Review of Economics and Statistics. 1994;76:356-360.
    [Google Scholar]
  26. , . Bayesian multivariate Poisson regression. Commun. Statist Theory Method. 2001;30:243-255.
    [Google Scholar]
  27. , . A general method to estimate correlated discrete random variables. Econometr. Theory. 1999;15:228-237.
    [Google Scholar]
  28. , . Likelihood ratio tests for model selection and non-nested hypotheses. Econometrica. 1989;57:307-333.
    [Google Scholar]
  29. , , , , . A bivariate zero-inflated Poisson regression model to analyze occupational injuries. Accid. Anal. Prev.. 2003;35:625-629.
    [Google Scholar]

Appendix I

Proof Theorem 1

Proof Eq. (12). V 1 j = U 1 j + U 3 j R.H.S = U 1 j + U 3 j = i = 1 n λ 1 i w ji φ ( y 1 i - 1 , y 2 i ) φ ( y 1 i , y 2 i ) - 1 + λ 3 i w ji φ ( y 1 i - 1 , y 2 i - 1 ) φ ( y 1 i , y 2 i ) - 1 but, from the recurrence relations of the bivariate Poisson distribution (Johnson et al., 1997), we have f JBP ( y 1 - 1 , y 2 - 1 ; λ 1 , λ 2 , λ 3 ) f JBP ( y 1 , y 2 ; λ 1 , λ 2 , λ 3 ) = y 1 λ 3 - λ 1 λ 3 f JBP ( y 1 - 1 , y 2 ; λ 1 , λ 2 , λ 3 ) f JBP ( y 1 , y 2 ; λ 1 , λ 2 , λ 3 ) and, this is equivalent to φ ( y 1 i - 1 , y 2 i - 1 ) φ ( y 1 i , y 2 i ) = y 1 i λ 3 i - λ 1 i λ 3 i φ ( y 1 i - 1 , y 2 i ) φ ( y 1 i , y 2 i ) .

Substituting this result in the R.H.S, we get R.H.S = U 1 j + U 3 j = i = 1 n λ 1 i w ji φ ( y 1 i - 1 , y 2 i ) φ ( y 1 i , y 2 i ) - 1 + λ 3 i w ji y 1 i λ 3 i - λ 1 i λ 3 i φ ( y 1 i - 1 , y 2 i ) φ ( y 1 i , y 2 i ) - 1 = i = 1 n [ y 1 i - λ 1 i - λ 3 i ] w ji = i = 1 n [ y 1 i - μ 1 i ] w ji = V 1 j = L.H.S and the proof is complete.

Proof Eq. (13). V 2 j = U 2 j L.H.S = V 2 j = i = 1 n - λ 2 i + y 2 i - 1 f Y 2 i Y 1 i ( y 2 i y 1 i ) r = 0 min ( y 1 i , y 2 i ) r y 1 i r p 1 i r ( 1 - p 1 i ) y 1 i - r e - λ 2 i λ 2 i y 2 i - r ( y 2 i - r ) ! w ji .

But, from the conditional density (4) we have f Y 2 Y 1 ( y 2 y 1 ) = r = 0 min ( y 1 , y 2 ) y 1 r p 1 r ( 1 - p 1 ) y 1 - r e - λ 2 λ 2 y 2 - r ( y 2 - r ) ! , where p 1 = λ 3 λ 3 + λ 1 and 1 - p 1 = λ 1 λ 3 + λ 1 .

Substituting these results in the L.H.S, we get L.H.S = V 2 j = i = 1 n - λ 2 i + λ 2 i r = 0 min ( y 1 i , y 2 i ) λ 3 i r λ 1 i ( y 1 i - r ) λ 2 i ( y 2 i - r - 1 ) r ! ( y 1 i - r ) ! ( y 2 i - r - 1 ) ! r = 0 min ( y 1 i , y 2 i ) λ 3 i r λ 1 i ( y 1 i - r ) λ 2 i ( y 2 i - r ) r ! ( y 1 i - r ) ! ( y 2 i - r ) ! w ji = i = 1 n λ 2 i w ji φ ( y 1 i , y 2 i - 1 ) φ ( y 1 i , y 2 i ) - 1 = U 2 j = R.H.S and the proof is complete.

Proof Eq. (14). V 3 j = U 3 j - U 1 j

We have p 1 i = λ 3 i λ 3 i + λ 1 i

Hence, log p 1 i 1 - p 1 i = log λ 3 i λ 1 i = log ( λ 3 i ) - log ( λ 1 i ) = w i T α 3 - w i T α 1 .

On the other hand log p 1 i 1 - p 1 i = w i T β 3

Therefore, w i T β 3 = w i T α 3 - w i T α 1

As the explanatory variables are independent, one gets β 3 j = α 3 j - α 1 j , j = 0 , 1 , , l .

Therefore, log L β 3 j = log L α 3 j . α 3 j α 3 j - log L α 1 j . α 1 j α 1 j , or equivalently log L β 3 j = log L α 3 j - log L α 1 j , and hence V 3 j = U 3 j - U 1 j .

This completes the proof.

Appendix II

The Appendix II involves the R and SAS language programs that are written in order to obtain the estimates with different models where proposed within the Paper. The programs are listed as follows:

  1. R-program for obtaining the estimates using the Joint bivariate Poisson regression model (JBPM).

  2. SAS-program for obtaining the estimates using the Joint bivariate Poisson regression model (JBPM).

  3. R-program for obtaining the estimates using the conditional regression model 1 (CM1).

  4. SAS-program for obtaining the estimates using the conditional regression model 1 (CM1).

A. R code for obtaining the estimates using the Joint bivariate Poisson regression model (JBPM).

library(rootsolve)# rootsolve involves command “multiroot”
health<-read.table(“C://Users//Administrator//Documents//Health Care Aus. DATA//Heath Care Aus. csv.csv”,header=TRUE,sep=”,”) #Download the file in R
n<-5190
h<-matrix(,nrow=n,ncol=1)
lambda1<-matrix(,nrow=n,ncol=1)
lambda2<-matrix(,nrow=n,ncol=1)
lambda3<-matrix(,nrow=n,ncol=1)
y1<-matrix(c(health[,13]), ncol=1,nrow=n)
y2<-matrix(c(health[,18]),ncol=1,nrow=n)
x<-matrix(c(rep(1,n),health[,1],health[,2],health[,4]),nrow=n,ncol=4)
b1<-matrix(,nrow=4,ncol=1) #The initial values of the parameters
b2<- matrix(,nrow=4,ncol=1) #The initial values of the parameters
b3<- matrix(,nrow=2,ncol=1) #The initial values of the parameters
my<-pmin(y1,y2) #this gives min(y1,y2)
fn<- function (b)
{
lambda1<- exp(b[1]+b[2]∗x[,2]+b[3]∗x[,3]+b[4]∗x[,4])
lamnda2<- exp(b[5]+b[6]∗x[,2]+b[7]∗x[,3]+b[8]∗x[,4])
lambda3<- exp(b[9]+b[10]∗x[,2])
for(i in 1:n){
a1<- lambda1[i]
a2<- lambda2[i]
a3<- lambda3 [i]
n1<-y1[i]
n2<-y2[i]
w1<-0.0
w2<-0.0
for(z in 0:my[i]) {
w1<-w1+(a3^z∗a1^(n1-z)∗a2^(n2-z)/(gamma(z+1)∗gamma(n1-z+1)∗gamma(n2-z+1)))
w2<-w2+(a3^z∗a1^(n1-z)∗a2^(n2-z)∗z/(gamma(z+1)∗gamma(n1-z+1)∗gamma(n2-z+1)))
}
w3<-w2/w1 
h[i]<-w3
}
u10=sum(-lamnda1+y1-h)
u11=sum((-lamnda1+y1- h)∗x[,2])
u12=sum((-lamnda1+y1-h)∗x[,3])
u13=sum((-lamnda1+y1-h)∗x[,4])
u20=sum(-lamnda2+y2-h)
u21=sum((-lamnda2+y2-h)∗x[,2])
u22=sum((-lamnda2+y2-h)∗x[,3])
u23=sum((-lamnda2+y2-h)∗x[,4])
u30=sum(-lamnda3+h)
u31=sum((-lamnda3+h)∗x[,2])
c(u10=u10,u11=u11,u12=u12,u13=u13, u20=u20,u21=u21,u22=u22,u23=u23,u30=u30,u31=u31)
}
fit<- multiroot(f=fn, start=c(rep(0,10)))
# calculating log-likelihood function
hod<-c()
w<-c()
lamnda1<-matrix(,nrow=n,ncol=1)
lamnda2<-matrix(,nrow=n,ncol=1)
lamnda3<-matrix(,nrow=n,ncol=1)
root<-matrix(c(fit$root),nrow=5,ncol=2)
bhat1<-matrix(c(root[1,1], root[2,1], root[3,1], root[4,1]),nrow=4,ncol=1)
bhat2<- matrix(c(root [5,1], root [1,2], root [2,2], root [3,2]),nrow=4,ncol=1)
bhat3<- matrix(c(root [4,2], root [5,2]),nrow=2,ncol=1)
lamnda1<- exp(bhat1[1,1]∗x[,1]+bhat1[2,1]∗x[,2]+bhat1[3,1]∗x[,3]+bhat1[4,1]∗x[,4])
lamnda2<- exp(bhat2[1,1]∗x[,1]+bhat2[2,1]∗x[,2]+bhat2[3,1]∗x[,3]+bhat2[4,1]∗x[,4])
lamnda3<- exp(bhat3[1,1]∗x[,1]+bhat3[2,1]∗x[,2])
for (k in 1:n){
a1<- lamnda1 [k]
a2<- lamnda12[k]
a3<- lamnda13[k]
x0<-y1[k]
y0<-y2[k]
xymin<-min(x0,y0)
lambdaratio<-a3/(a1∗a2)
i<-0:xymin
sums<- -lgamma(y1[k]-i+1)-lgamma(i+1)-lgamma(y2[k]-i+1)+i∗log(lambdaratio)
maxsums<-max(sums)
sums<-sums-maxsums
logsummation<-log(sum(exp(sums)))+maxsums
w[k]<- -sum(a1+a2+a3)+ y1[k]∗log(a1)+ y2[k]∗log(a2)+logsummation
}
hod<-sum(w)
B. SAS code for obtaining the estimates using the Joint bivariate Poisson regression model (JBPM).
proc nlmixed data=file name;
parameters b01=0 b11=0 b12=0 b13=0 b02=0 b21=0 b22=0 b23=0 b03=0 b31=0;
lambda1=exp(b01+b11∗sex+b12∗age+b13∗income);
lambda2=exp(b02+b21∗sex+b22∗age+b23∗income);
lambda3=exp(b03+b31∗sex);
f=0;
do r=0 to MIN(doctorco,prescrib);
f+exp(-(lambda1+lambda2+lambda3))∗(lambda1∗∗doctorco)∗(lambda2∗∗prescrib)∗((lambda3/(lambda1∗lambda2))∗∗r)/
(fact(doctorco-r)∗fact(prescrib-r)∗fact(r));
end;
ll=log(f);
model prescrib∼general(ll);
run;
C. R code for obtaining the estimates using the conditional regression model 1 (CM1).
p1<-matrix(,nrow=n,ncol=1)
h<-matrix(,nrow=n,ncol=1)
lambda2<-matrix(,nrow=n,ncol=1)
mu<-matrix(,nrow=n,ncol=1)
y1<-matrix(c(health[,13]), ncol=1,nrow=n)
y2<-matrix(c(health[,18]),ncol=1,nrow=n)
x<-matrix(c(rep(1,n),health[,1],health[,2],health[,4]),nrow=n,ncol=4)
b1<-matrix(,nrow=4,ncol=1)
b2<- matrix(,nrow=4,ncol=1)
my<-pmin(y1,y2) #this gives min(y1,y2)
fn<- function (b)
{
lambda2<- exp(b[1]+b[2]∗x[,2]+b[3]∗x[,3]+b[4]∗x[,4])
mu<- exp(b[5]+b[6]∗x[,2]+b[7]∗x[,3]+b[8]∗x[,4])
p1<- mu2/ (1+mu2)
for(i in 1:n){
a1<-p1[i]
a2<-lambda2[i]
n1<-y1[i]
n2<-y2[i]
w1<-0.0
w2<-0.0
for(z in 0:my[i]) {
db<- dbinom(z,n1,a1)
dp<- dpois(n2-z,a2)
w1<-w1+db∗dp
w2<-w2+z∗db∗dp
}
w3<-w2/w1 
h[i]<-w3
i=i+1
}
u10=sum(-lambda2+y2-h)
u11=sum((-lambda2+y2- h)∗x[,2])
u12=sum((-lambda2+y2-h)∗x[,3])
u13=sum((-lambda2+y2-h)∗x[,4])
u20=sum(h- y1∗ p1)
u21=sum((h - y1∗p1)∗x[,2])
u22=sum((h - y1∗ p1)∗x[,3])
u23=sum((h - y1∗ p1)∗x[,4])
c(u10=u10,u11=u11,u12=u12,u13=u13, u20=u20,u21=u21,u22=u22,u23=u23)
}
fit<- multiroot(f=fn, start=c(rep(0,8)))
#Calculating log likelihood function
root<-matrix(c(fit$root),nrow=4,ncol=2)
hod<-c()
w<-c()
bhat1<-matrix(c(root[,1]),nrow=4,ncol=1)
bhat2<-matrix(c(root[,2]),nrow=4,ncol=1)
lambda2<- exp(x[,]%∗%bhat1)
mu<- exp(x[,]%∗%bhat2)
p1<-mu/(1+mu)
for (k in 1:n) {
a1<-p1[k]
a2<-lambda2[k]
x0<-y1[k]
y0<-y2[k]
xymin<-min(x0,y0)
i<-0:xymin
sums<-lgamma(y1[k]+1)-lgamma(i+1)-lgamma(y1[k]-i+1)-lgamma(y2[k]-i+1)+i∗log(a1)+(y1[k]-i)∗log(1-a1)+(y2[k]-i)∗log(a2)
maxsums<-max(sums)
sums<-sums-maxsums
logsummation<-log(sum(exp(sums)))+maxsums
w[k]<- -a2+logsummation
}
hod<-sum(w)
D. SAS code for obtaining the estimates using the conditional regression model 1 (CM1).
proc nlmixed data=file name;
parameters
b10=0 b11=0 b12=0 b13=0
eta10=0 eta11=0 eta12=0 eta13=0;
lambda2=exp(b10+b11∗sex+b12∗age+b13∗income);
p1=exp(eta10+eta11∗sex+eta12∗age+eta13∗income)/(1+exp(eta10+eta11∗sex+eta12∗age+eta13∗income));
f=0;
do r=0 to MIN(doctorco,prescrib);
f+fact(doctorco)∗(p1∗∗r)∗((1-p1)∗∗(doctorco-r))∗exp(-lambda2)∗(lambda2∗∗(prescrib-r))/
(fact(r)∗fact(doctorco-r)∗fact(prescrib-r));
end;
ll=log(f);
model prescrib∼general(ll);
run;

Show Sections