N1poisson {VGAM} | R Documentation |
Linear Model and Poisson Mixed Data Type Family Function
Description
Estimate the four parameters of
the (bivariate) –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 |
imethod , isd , ilambda , iapar |
Initial values.
Details at |
zero |
Details at |
doff |
Numeric of unit length, the denominator offset
Alternatively,
|
nnodes , copula |
Details at |
var.arg |
See |
Details
The bivariate response comprises
from a linear model
having parameters
mean
and sd
for
and
,
and the Poisson count
having parameter
lambda
for its mean .
The
joint probability density/mass function is
where
adjusts
according to the association parameter
.
The quantity
is
where
maps
onto the unit interval.
The quantity
is
.
Thus there is an underlying bivariate normal
distribution, and a copula is used to bring the
two marginal distributions together.
Here,
, and
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
then
.
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
.
This VGAM family function cannot handle
multiple responses.
Only a two-column matrix is allowed.
The two-column fitted
value matrix has columns
and
.
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)