skellam.reg {skellam} | R Documentation |
Skellam Regression
Description
Fits a regression model assuming a Skellam distribution for the response variable.
Usage
skellam.reg(y, x)
Arguments
y |
A vector of integers (positive or negative) |
x |
A matrix, vector or data.frame of covariates |
Details
The function uses an exponential link function to ensure positive values for both
rate parameters (\lambda_1
and \lambda_2
). Optimization is performed
using nlm
.
Value
A list with components:
- loglik
Maximized log-likelihood value
- param1
Matrix for
\lambda_1
parameters:Column 1: Estimated coefficients
Column 2: Standard errors
Column 3: t-values (coef/se)
Column 4: p-values (Wald test)
- param2
Matrix for
\lambda_2
parameters (same structure as param1)
Author(s)
Michail Tsagris
References
Skellam, J. G. (1946) The frequency distribution of the difference between two Poisson variates belonging to different populations. Journal of the Royal Statistical Society, Series A 109(3), 296.
Strackee, J.; van der Gon, J. J. D. (1962) The frequency distribution of the difference between two Poisson variates. Statistica Neerlandica 16(1), 17-23.
Karlis D. and Ntzoufras I. (2009) Analysis of sports data using bivariate Poisson models. IMA Conference Presentation. http://www2.stat-athens.aueb.gr/~jbn/papers/files/20_Karlis_Ntzoufras_2009_IMA_presentation_handouts_v01.pdf
Examples
set.seed(0)
x <- rnorm(100)
y1 <- rpois(100, exp(1 + 1 * x))
y2 <- rpois(100, exp(-1 + 1 * x))
y <- y2 - y1
skellam.reg(y, x)