skellam.reg: Regression assuming a Skellam distribution

Description Usage Arguments Details Value Author(s) References Examples

View source: R/skellam.reg.R

Description

Regression assuming a Skellam distribution.

Usage

1

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 λ_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 λ_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 λ_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://stat-athens.aueb.gr/~jbn/papers/files/20_Karlis_Ntzoufras_2009_IMA_presentation_handouts_v01.pdf

Examples

1
2
3
4
5
6
7
8
9
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)

Example output

$loglik
[1] -1960.624

$param1
             Estimate Std. Error Wald value       p-value
(Intercept) 0.9977026 0.03011223   33.13280 1.001885e-240
x           1.0173390 0.02610789   38.96672  0.000000e+00

$param2
              Estimate Std. Error Wald value      p-value
(Intercept) -0.8128960  0.1407481  -5.775539 7.670721e-09
x            0.9593452  0.1521020   6.307248 2.840407e-10

skellam documentation built on May 2, 2019, 3:25 a.m.

Related to skellam.reg in skellam...