oipospoisson | R Documentation |
Fits a 1-inflated positive Poisson distribution.
oipospoisson(lpstr1 = "logitlink", llambda = "loglink",
type.fitted = c("mean", "lambda", "pobs1", "pstr1", "onempstr1"),
ilambda = NULL, gpstr1 = (1:19)/20, gprobs.y = (1:19)/20,
imethod = 1, zero = NULL)
lpstr1 , llambda |
For |
ilambda , gpstr1 , gprobs.y , imethod |
For initial values.
See |
type.fitted , zero |
See |
The 1-inflated positive Poisson distribution is a mixture
distribution of the
positive (0-truncated) Poisson
distribution with some probability of obtaining a (structural) 1.
Thus there are two sources for obtaining the value 1.
It is similar to a zero-inflated Poisson model, except
the Poisson is replaced by a positive Poisson and the 0 is replaced
by 1.
This distribution is written here
in a way that retains a similar notation to the
zero-inflated Poisson, i.e., the
probability P[Y=1]
involves another parameter \phi
.
See zipoisson
.
This family function can handle multiple responses.
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
rrvglm
and vgam
.
Under- or over-flow may occur if the data is ill-conditioned.
Thomas W. Yee
Oipospois
,
pospoisson
,
oapospoisson
,
otpospoisson
,
zipoisson
,
poissonff
,
simulate.vlm
.
## Not run: set.seed(1)
pdata <- data.frame(x2 = runif(nn <- 1000)) # Artificial data
pdata <- transform(pdata, pstr1 = 0.5, lambda = exp(3 - x2))
pdata <- transform(pdata, y1 = roipospois(nn, lambda, pstr1 = pstr1))
with(pdata, table(y1))
fit1 <- vglm(y1 ~ x2, oipospoisson, data = pdata, trace = TRUE)
coef(fit1, matrix = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.