N1poisson {VGAM}R Documentation

Linear Model and Poisson Mixed Data Type Family Function

Description

Estimate the four parameters of the (bivariate) N1N_1–Poisson copula mixed data type model by maximum likelihood estimation.

Usage

N1poisson(lmean = "identitylink", lsd = "loglink",
    lvar = "loglink", llambda = "loglink", lapar = "rhobitlink",
    zero = c(if (var.arg) "var" else "sd", "apar"),
    doff = 5, nnodes = 20, copula = "gaussian",
    var.arg = FALSE, imethod = 1, isd = NULL,
    ilambda = NULL, iapar = NULL)

Arguments

lmean, lsd, lvar, llambda, lapar

Details at CommonVGAMffArguments. See Links for more link function choices. The second response is primarily controlled by the parameter λ2\lambda_2.

imethod, isd, ilambda, iapar

Initial values. Details at CommonVGAMffArguments.

zero

Details at CommonVGAMffArguments.

doff

Numeric of unit length, the denominator offset δ>0\delta>0. A monotonic transformation Δ=λ22/3/(δ+λ22/3)\Delta^* = \lambda_2^{2/3} / (|\delta| + \lambda_2^{2/3}) is taken to map the Poisson mean onto the unit interval. This argument is δ\delta. The default reflects the property that the normal approximation to the Poisson work wells for λ210\lambda_2 \geq 10 or thereabouts, hence that value is mapped to the origin by qnorm. That's because 10**(2/3) is approximately 5. It is known that the λ2\lambda_2 rate parameter raised to the power of 2/32/3 is a transformation that approximates the normal density more closely.

Alternatively, delta may be assigned a single negative value. If so, then Δ=log(1+λ2)/[δ+log(1+λ2)]\Delta^* = \log(1 + \lambda_2) / [|\delta| + \log(1 + \lambda_2)] is used. For this, doff = -log1p(10) is suggested.

nnodes, copula

Details at N1binomial.

var.arg

See uninormal.

Details

The bivariate response comprises Y1Y_1 from a linear model having parameters mean and sd for μ1\mu_1 and σ1\sigma_1, and the Poisson count Y2Y_2 having parameter lambda for its mean λ2\lambda_2. The joint probability density/mass function is P(y1,Y2=y2)=ϕ1(y1;μ1,σ1)exp(h1(Δ))[h1(Δ)]y2/y2!P(y_1, Y_2 = y_2) = \phi_1(y_1; \mu_1, \sigma_1) \exp(-h^{-1}(\Delta)) [h^{-1}(\Delta)]^{y_2} / y_2! where Δ\Delta adjusts λ2\lambda_2 according to the association parameter α\alpha. The quantity Δ\Delta is Φ((Φ1(h(λ2))αZ1)/1α2)\Phi((\Phi^{-1}(h(\lambda_2)) - \alpha Z_1) / \sqrt{1 - \alpha^2}) where hh maps λ2\lambda_2 onto the unit interval. The quantity Z1Z_1 is (Y1μ1)/σ1(Y_1-\mu_1) / \sigma_1. Thus there is an underlying bivariate normal distribution, and a copula is used to bring the two marginal distributions together. Here, 1<α<1-1 < \alpha < 1, and Φ\Phi is the cumulative distribution function pnorm of a standard univariate normal.

The first marginal distribution is a normal distribution for the linear model. The second column of the response must have nonnegative integer values. When α=0\alpha = 0 then Δ=Δ\Delta=\Delta^*. Together, this family function combines uninormal and poissonff. If the response are correlated then a more efficient joint analysis should result.

The second marginal distribution allows for overdispersion relative to an ordinary Poisson distribution—a property due to α\alpha.

This VGAM family function cannot handle multiple responses. Only a two-column matrix is allowed. The two-column fitted value matrix has columns μ1\mu_1 and λ2\lambda_2.

Value

An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm and vgam.

Note

This VGAM family function is based on N1binomial and shares many properties with it. It pays to set trace = TRUE to monitor convergence, especially when abs(apar) is high.

Author(s)

T. W. Yee

See Also

rN1pois, N1binomial, binormalcop, uninormal, poissonff, dpois.

Examples

apar <- rhobitlink(0.3, inverse = TRUE)
nn <- 1000; mymu <- 1; sdev <- exp(1)
lambda <- loglink(1, inverse = TRUE)
mat <- rN1pois(nn, mymu, sdev, lambda, apar)
npdata <- data.frame(y1 = mat[, 1], y2 = mat[, 2])
with(npdata, var(y2) / mean(y2))  # Overdispersion
fit1 <- vglm(cbind(y1, y2) ~ 1, N1poisson,
             npdata, trace = TRUE)
coef(fit1, matrix = TRUE)
Coef(fit1)
head(fitted(fit1))
summary(fit1)
confint(fit1)

[Package VGAM version 1.1-11 Index]