simple.bp{bivpois} |
R Documentation |
Produces a "list" object which gives details
regarding the fit of a simple bivariate Poisson model of the form (X,Y) ~ BP(ë1, ë2, ë3)
simple.bp(x, y, ini3=1.0, maxit=300, pres=1e-8)
x, y |
vectors containing the
data |
ini3 |
Initial value for ë3 |
maxit |
Maximum number of EM
steps |
pres |
Precision used in
log-likelihood improvement |
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 |
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.
1.
Karlis, D. and Ntzoufras, I. (2004). Bivariate Poisson and Diagonal
Inflated Bivariate Poisson Regression Models in S. (submitted). Technical
Report, Athens University of Economics and Business, Athens, Greece.
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.
1.
Dimitris Karlis, Department of Statistics, Athens University of
Economics and Business, Athens, Greece, e-mail: karlis@aueb.gr
.
2.
Ioannis Ntzoufras, Department of Statistics, Athens University of
Economics and Business, Athens, Greece, e-mail: ntzoufras@aueb.gr .
#
# Generation of BP(1,2,3) data
x3<-rpoisson(100, 3)
x1<-rpoisson(100, 1)+x3
x2<-rpoisson(100, 2)+x3
#
# fits the model
x<-simple.bp(x1, x2)
#
# Monitors parameters
x$lambda1
x$lambda2
x$lambda3