cratio: Ordinal Regression with Continuation Ratios

View source: R/family.categorical.R

cratioR Documentation

Ordinal Regression with Continuation Ratios

Description

Fits a continuation ratio logit/probit/cloglog/cauchit/... regression model to an ordered (preferably) factor response.

Usage

cratio(link = "logitlink", parallel = FALSE, reverse = FALSE,
    zero = NULL, thresholds = c("unconstrained", "equidistant",
    "symmetric1", "symmetric0"), Treverse = reverse,
    Tref = if (Treverse) "M" else 1, whitespace = FALSE)

Arguments

link

Link function applied to the M continuation ratio probabilities. See Links for more choices.

parallel

A logical, or formula specifying which terms have equal/unequal coefficients.

reverse

Logical. By default, the continuation ratios used are \eta_j = logit(P[Y>j|Y \geq j]) for j=1,\dots,M. If reverse is TRUE, then \eta_j = logit(P[Y<j+1|Y\leq j+1]) will be used.

zero

An integer-valued vector specifying which linear/additive predictors are modelled as intercepts only. The values must be from the set {1,2,...,M}. The default value means none are modelled as intercept-only terms. See CommonVGAMffArguments for more information.

thresholds, Treverse, Tref

See cumulative for information. These arguments apply to ordinal categorical regression models.

whitespace

See CommonVGAMffArguments for information.

Details

In this help file the response Y is assumed to be a factor with ordered values 1,2,\dots,M+1, so that M is the number of linear/additive predictors \eta_j.

There are a number of definitions for the continuation ratio in the literature. To make life easier, in the VGAM package, we use continuation ratios and stopping ratios (see sratio). Stopping ratios deal with quantities such as logitlink(P[Y=j|Y>=j]).

Value

An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, rrvglm and vgam.

Warning

No check is made to verify that the response is ordinal if the response is a matrix; see ordered.

Boersch-Supan (2021) looks at sparse data and the numerical problems that result; see sratio.

Note

The response should be either a matrix of counts (with row sums that are all positive), or a factor. In both cases, the y slot returned by vglm/vgam/rrvglm is the matrix of counts.

For a nominal (unordered) factor response, the multinomial logit model (multinomial) is more appropriate.

Here is an example of the usage of the parallel argument. If there are covariates x1, x2 and x3, then parallel = TRUE ~ x1 + x2 -1 and parallel = FALSE ~ x3 are equivalent. This would constrain the regression coefficients for x1 and x2 to be equal; those of the intercepts and x3 would be different.

Author(s)

Thomas W. Yee

References

See sratio.

See Also

sratio, acat, cumulative, multinomial, margeff, pneumo, budworm, logitlink, probitlink, clogloglink, cauchitlink.

Examples

pneumo <- transform(pneumo, let = log(exposure.time))
(fit <- vglm(cbind(normal, mild, severe) ~ let,
             cratio(parallel = TRUE), data = pneumo))
coef(fit, matrix = TRUE)
constraints(fit)
predict(fit)
predict(fit, untransform = TRUE)
margeff(fit)

VGAM documentation built on Sept. 19, 2023, 9:06 a.m.