sratio {VGAM} | R Documentation |
Fits a stopping ratio logit/probit/cloglog/cauchit/... regression model to an ordered (preferably) factor response.
sratio(link = "logit", earg = list(), parallel = FALSE, reverse = FALSE, zero = NULL)
In the following, the response Y is assumed to be a factor with ordered values 1,2,...,M+1, so that M is the number of linear/additive predictors eta_j.
link |
Link function applied to the M
stopping ratio probabilities.
See Links for more choices.
|
earg |
List. Extra argument for the link function.
See earg in Links for general information.
|
parallel |
A logical, or formula specifying which terms have
equal/unequal coefficients.
|
reverse |
Logical.
By default, the stopping ratios used are
eta_j = logit(P[Y=j|Y>=j])
for j=1,...,M.
If reverse is TRUE , then
eta_j = logit(P[Y=j+1|Y<=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.
|
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 (see cratio
)
and stopping ratios.
Continuation ratios deal with quantities such as
logit(P[Y>j|Y>=j])
.
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
rrvglm
and vgam
.
No check is made to verify that the response is ordinal;
see ordered
.
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.
Thomas W. Yee
Agresti, A. (2002) Categorical Data Analysis, 2nd ed. New York: Wiley.
Simonoff, J. S. (2003) Analyzing Categorical Data, New York: Springer-Verlag.
McCullagh, P. and Nelder, J. A. (1989) Generalized Linear Models, 2nd ed. London: Chapman & Hall.
Documentation accompanying the VGAM package at http://www.stat.auckland.ac.nz/~yee contains further information and examples.
cratio
,
acat
,
cumulative
,
multinomial
,
pneumo
,
logit
,
probit
,
cloglog
,
cauchit
.
data(pneumo) pneumo = transform(pneumo, let=log(exposure.time)) (fit = vglm(cbind(normal,mild,severe) ~ let, sratio(parallel=TRUE), pneumo)) coef(fit, matrix=TRUE) constraints(fit) predict(fit) predict(fit, untransform=TRUE)