oilog | R Documentation |
Fits a 1-inflated logarithmic distribution.
oilog(lpstr1 = "logitlink", lshape = "logitlink",
type.fitted = c("mean", "shape", "pobs1", "pstr1",
"onempstr1"), ishape = NULL, gpstr1 = ppoints(8), gshape =
ppoints(8), zero = NULL)
lpstr1 , lshape |
Link functions.
For |
gpstr1 , gshape , ishape |
For initial values.
See |
type.fitted , zero |
See |
The 1-inflated logarithmic distribution is a mixture
distribution of the
logarithmic
distribution with some probability of obtaining a (structural) 1.
Thus there are two sources for obtaining the value 1.
This distribution is written here
in a way that retains a similar notation to the
one-inflated positive-Poisson, i.e., the
probability P[Y=1]
involves another parameter \phi
.
See oipospoisson
.
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
.
Thomas W. Yee
Gaitdlog
,
Oilog
,
logff
,
Oizeta
.
## Not run: odata <- data.frame(x2 = runif(nn <- 1000)) # Artificial data
odata <- transform(odata, pstr1 = logitlink(-1 + x2, inv = TRUE),
shape = 0.5)
odata <- transform(odata, y1 = roilog(nn, shape, pstr1 = pstr1))
with(odata, table(y1))
fit1 <- vglm(y1 ~ x2, oilog(zero = "shape"), odata, 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.