Fits an adjacent categories regression model to an ordered (preferably) factor response.
acat(link = "loglink", parallel = FALSE, reverse = FALSE,
zero = NULL, thresholds = c("unconstrained", "equidistant"),
Treverse = reverse, Tref = if (Treverse) "M" else 1,
whitespace = FALSE)
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions
such as vglm
,
rrvglm
and vgam
.
Link function applied to the ratios of the
adjacent categories probabilities.
See Links
for more choices.
A logical, or formula specifying which terms have equal/unequal coefficients.
Logical.
By default, the linear/additive predictors used are
\(\eta_j = \log(P[Y=j+1]/P[Y=j])\)
for \(j=1,\ldots,M\).
If reverse
is TRUE
then
\(\eta_j = \log(P[Y=j]/P[Y=j+1])\)
will be used.
An integer-valued vector specifying which
linear/additive predictors are modelled as intercepts only.
The values must be from the set {1,2,...,\(M\)}.
See CommonVGAMffArguments
for more information.
See cumulative
for information.
These arguments apply to ordinal
categorical regression models.
See CommonVGAMffArguments
for information.
Thomas W. Yee
No check is made to verify that the response is ordinal if the
response is a matrix;
see ordered
.
In this help file the response \(Y\) is assumed to be a factor with ordered values \(1,2,\ldots,M+1\), so that \(M\) is the number of linear/additive predictors \(\eta_j\). By default, the log link is used because the ratio of two probabilities is positive.
Internally, deriv3
is called to
perform symbolic differentiation and
consequently this family function will struggle if
\(M\) becomes too large.
If this occurs, try combining levels so that
\(M\) is effectively reduced.
One idea is to aggregate levels with the fewest observations
in them first.
Agresti, A. (2013).
Categorical Data Analysis,
3rd ed. Hoboken, NJ, USA: Wiley.
Tutz, G. (2012).
Regression for Categorical Data,
Cambridge: Cambridge University Press.
Yee, T. W. (2010).
The VGAM package for categorical data analysis.
Journal of Statistical Software,
32, 1--34.
tools:::Rd_expr_doi("10.18637/jss.v032.i10").
cumulative
,
cratio
,
sratio
,
multinomial
,
margeff
,
pneumo
,
budworm
,
deriv3
.
pneumo <- transform(pneumo, let = log(exposure.time))
(fit <- vglm(cbind(normal, mild, severe) ~ let, acat, pneumo))
coef(fit, matrix = TRUE)
constraints(fit)
model.matrix(fit)
Run the code above in your browser using DataLab