Fits a one-altered logarithmic distribution based on a conditional model involving a Bernoulli distribution and a 1-truncated logarithmic distribution.
oalog(lpobs1 = "logitlink", lshape = "logitlink", type.fitted = c("mean", "shape", "pobs1", "onempobs1"), ipobs1 = NULL, gshape = ppoints(8), zero = NULL)
Link function for the parameter
Y is one with probability
Y has a 1-truncated logarithmic distribution with
0 < p_1 < 1,
which is modelled as a function of the covariates. The one-altered
logarithmic distribution differs from the one-inflated
logarithmic distribution in that the former has ones coming from one
source, whereas the latter has ones coming from the logarithmic
distribution too. The one-inflated logarithmic distribution
is implemented in the VGAM package. Some people
call the one-altered logarithmic a hurdle model.
The input can be a matrix (multiple responses).
By default, the two linear/additive predictors
An object of class
The object is used by modelling functions
fitted.values slot of the fitted object,
which should be extracted by the generic function
returns the mean
\mu (default) which is given by
\mu = \phi + (1-\phi) A
A is the mean of the one-truncated
type.fitted = "pobs1" then
This family function effectively combines
one family function.
T. W. Yee
## Not run: odata <- data.frame(x2 = runif(nn <- 1000)) odata <- transform(odata, pobs1 = logitlink(-1 + 2*x2, inv = TRUE), shape = logitlink(-2 + 3*x2, inv = TRUE)) odata <- transform(odata, y1 = roalog(nn, shape, pobs1 = pobs1), y2 = roalog(nn, shape, pobs1 = pobs1)) with(odata, table(y1)) ofit <- vglm(cbind(y1, y2) ~ x2, oalog, data = odata, trace = TRUE) coef(ofit, matrix = TRUE) head(fitted(ofit)) head(predict(ofit)) summary(ofit) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.