skellam.reg {skellam} | R Documentation |
Regression assuming a Skellam distribution
Description
Regression assuming a Skellam distribution.
Usage
skellam.reg(y, x)
Arguments
y |
A vector of integers, positive or negative. |
x |
A matrix, a vector or a data.frame with the covariates. |
Details
We use the exponential link function to ensure that the both \lambda_s
are positive.
The command nlm
does the main job.
Value
A list including:
loglik |
The maximised log-likelihood value. |
param1 |
The estimated regression coefficients of |
param2 |
The estimated regression coefficients of |
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, 26.
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 and Ntzoufras IMA 2009 presentation http://www2.stat-athens.aueb.gr/~jbn/papers/files/20_Karlis_Ntzoufras_2009_IMA_presentation_handouts_v01.pdf
Examples
require('skellam')
set.seed(0)
x <- rnorm(1000)
y1 <- rpois(1000, exp(1 + 1 * x) )
y2 <- rpois(1000 , exp(-1 + 1 * x) )
y <- y2 - y1
skellam.reg(y, x)