Learn R Programming

skellam (version 0.2.4)

skellam.reg: Skellam Regression

Description

Fits a regression model assuming a Skellam distribution for the response variable.

Usage

skellam.reg(y, x)

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)

Arguments

y

A vector of integers (positive or negative)

x

A matrix, vector or data.frame of covariates

Author

Michail Tsagris

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.

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

Run this code
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)

Run the code above in your browser using DataLab