zoabetaR.RdEstimation of the shape parameters of the two-parameter beta distribution plus the probabilities of a 0 and/or a 1.
zoabetaR(lshape1 = "loglink", lshape2 = "loglink", lpobs0 = "logitlink",
lpobs1 = "logitlink", ishape1 = NULL, ishape2 = NULL, trim = 0.05,
type.fitted = c("mean", "pobs0", "pobs1", "beta.mean"),
parallel.shape = FALSE, parallel.pobs = FALSE, zero = NULL)Details at CommonVGAMffArguments.
See Links for more choices.
Details at CommonVGAMffArguments.
Same as betaR.
See CommonVGAMffArguments for information.
See CommonVGAMffArguments for more information.
The choice "beta.mean" mean to return the mean of
the beta distribution; the 0s and 1s are ignored.
See CommonVGAMffArguments for more information.
The standard 2-parameter beta distribution has a support on (0,1),
however, many datasets have 0 and/or 1 values too.
This family function handles 0s and 1s (at least one of
them must be present) in
the data set by modelling the probability of a 0 by a
logistic regression (default link is the logit), and similarly
for the probability of a 1. The remaining proportion,
1-pobs0-pobs1,
of the data comes from a standard beta distribution.
This family function therefore extends betaR.
One has \(M=3\) or \(M=4\) per response.
Multiple responses are allowed.
Similar to betaR.
if (FALSE) { # \dontrun{
nn <- 1000; set.seed(1)
bdata <- data.frame(x2 = runif(nn))
bdata <- transform(bdata,
pobs0 = logitlink(-2 + x2, inverse = TRUE),
pobs1 = logitlink(-2 + x2, inverse = TRUE))
bdata <- transform(bdata,
y1 = rzoabeta(nn, shape1 = exp(1 + x2), shape2 = exp(2 - x2),
pobs0 = pobs0, pobs1 = pobs1))
summary(bdata)
fit1 <- vglm(y1 ~ x2, zoabetaR(parallel.pobs = TRUE),
data = bdata, trace = TRUE)
coef(fit1, matrix = TRUE)
summary(fit1)
} # }