Bivariate Poisson Regression in R?
Asked Answered
F

2

12

I found a package 'bivpois' for R which evaluates a model for two related poisson processes (for example, the number of goals by the home and the away team in a soccer game). However, this package seems to no longer be useable in newer versions of R.

Is there a reasonable way to modify the glm() function to do a similar process, or run this older package on my new version of R? I have found very little literature on these sorts of processes and have found very little in terms of easy implementation in other statistical packages like STATA.

Any suggestions would be much appreciated.

Furrier answered 16/4, 2012 at 19:48 Comment(4)
If you are open to using OpenBUGS it looks like the author of the package might include code here (and may discuss the approach on page 291-293 of his book) stat-athens.aueb.gr/~jbn/winbugs_book Even if you do not want to use Bayesian you might still check out the book because I think sometimes he presents frequentist R code too, although I am not 100% sure about that. Also, consider emailing him.Phrasing
Google turned this up ats.ucla.edu/stat/r/dae/poissonreg.htmCatlett
@Seth, I don't think your link answers the question (the OP wants bivariate Poisson regression, not plain-vanilla Poisson regression)Hasdrubal
It is not exactly bivpois solution but you might want to check multicmp for "bivariate COM-Poisson distribution" github.com/diagdavenport/multicmpBrickbat
S
7

While CRAN does not host a current binary of bivpois, you can build the package from the archived source code (see http://cran.r-project.org/doc/manuals/R-exts.html#Checking-and-building-packages ). Building bivpois 0.50-3.1 from source (available at http://cran.r-project.org/src/contrib/Archive/bivpois/) works for me on R 2.15.0 Windows x64. The zipped Windows binary I built is available here: http://commondatastorage.googleapis.com/jthetzel-public/bivpois_0.50-3.1.zip .

Sommers answered 17/4, 2012 at 16:1 Comment(3)
jthetzel, Thanks for the information. I went ahead and downloaded an older version of R and my zipped package does work on that. So I guess a followup question is whether there is any function like 'predprob' (in the 'pscl' package), or if I must manually do predictions from the model (they're not as straight-forward as I had hoped). Thanks again.Furrier
You could also look into the VGLM package on CRAN.Laubin
Sorry, that should be VGAM package!Laubin
C
0

You can feel free to refer to odds modelling and testing inefficiency of sports-bookmakersas I had modified the relevant functions inside bivpois package.

Cumming answered 5/12, 2017 at 11:55 Comment(2)
you don't provide any code though, am I right (in your github)?Uninterrupted
You are feel free to browse over source code via Rmodel package.Haunt

© 2022 - 2024 — McMap. All rights reserved.