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.

GSee
  • 48,880
  • 13
  • 125
  • 145
Millsy11
  • 121
  • 1
  • 4
  • 2
    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) http://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. – Mark Miller Apr 16 '12 at 21:13
  • Google turned this up http://www.ats.ucla.edu/stat/r/dae/poissonreg.htm – Seth Apr 16 '12 at 21:19
  • @Seth, I don't think your link answers the question (the OP wants *bivariate* Poisson regression, not plain-vanilla Poisson regression) – Ben Bolker Apr 17 '12 at 16:04
  • It is not exactly `bivpois` solution but you might want to check `multicmp` for "bivariate COM-Poisson distribution" https://github.com/diagdavenport/multicmp – radek Feb 25 '19 at 01:05

2 Answers2

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 .

jthetzel
  • 3,603
  • 3
  • 25
  • 38
  • 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. – Millsy11 Apr 30 '12 at 15:55
  • You could also look into the VGLM package on CRAN. – kjetil b halvorsen Feb 09 '17 at 19:49
  • 1
    Sorry, that should be VGAM package! – kjetil b halvorsen Feb 09 '17 at 20:24
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.