simple.bp {bivpois}R Documentation

Simple Bivariate Poisson Model

Description

Produces a "list" object which gives details regarding the fit of a simple bivariate Poisson model of the form $(X,Y) sim BP(λ_1, λ_2, λ_3)$.

Usage

simple.bp(x, y, ini3 = 1, maxit = 300, pres = 1e-08)

Arguments

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.
ini3 Initial value for $λ_3$.
maxit Maximum number of EM steps.
pres Precision used in log-likelihood improvement.

Details

During the run of the algorithm the following details are printed: the iteration number, lambda1, lambda2, lambda3, the log-likelihood and the relative difference of the log-likelihood.

Value

A list object returned with the following variables.

lambda Vector with parameter values $λ_1$ , $λ_2$, $λ_3$
loglikelihood Ìaximized log-likelihood of the fitted model. This is given in a vector form (one value per iteration).Using this we may monitor the log-likelihood improvement and how EM algorithm works.
AIC, BIC AIC and BIC of the model. Values are also given for the double Poisson model and the saturated model.
parameters Number of parameters.
iterations Number of iterations.

Author(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 .

References

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.

See Also

pbivpois, lm.bp, lm.dibp

Examples

#
# Generation of BP(1,2,3) data
x3<-rpois(100, 3)
x1<-rpois(100, 1)+x3
x2<-rpois(100, 2)+x3
#
# fits the model
x<-simple.bp(x1, x2)
#
# Monitors parameters
x$lambda1
x$lambda2
x$lambda3
#
# alternatively (for 10 iterations)
x<-simple.bp( cbind(x1, x2), maxit=2 )


[Package bivpois version 0.50-3 Index]