skellam.reg: Regression assuming a Skellam distribution

View source: R/skellam.reg.R

skellam.regR 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 \lambda_1. This is matrix, with the first column being the estimated regression coefficients. The second column is their relevant standard error. The third column is the t value (coef/se(coef)) and the final column is the p-value of the Wald test.

param2

The estimated regression coefficients of \lambda_2. This is matrix, with the first column being the estimated regression coefficients. The second column is their relevant standard error. The third column is the t value (coef/se(coef)) and the final column is the p-value of the Wald test.

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)

skellam documentation built on Feb. 7, 2024, 3:02 a.m.

Related to skellam.reg in skellam...