The function solves the score function for coefficients of the marginal likelihood by using Gauss-Hermite quadrature (e.g., Hedeker; 1994). Random effects are predicted by their expectation (see Hartzl et al.; 2001). Standard deviations of parameter estimates are, by default, based on the expected Fisher-information matrix.
cumulative(link = c("logit", "probit", "cauchy"))
adjacent(link = "logit")
baseline(link = "logit")
olmm(formula, data, family = cumulative(), weights, subset, na.action = na.omit, offset, contrasts, control = olmm_control(), ...)
y ~ ce(x1) + ge(x2) +re(1 + ge(w2) | id)
where ce(x1)
specifies that the predictor x1
has a
category-specific i.e. non-proportional odds effect and
ge(x2)
that the predictor x2
has global
i.e. proportional odds fixed effect, see ge
,
resp. ce
. Random effects are specified within the
re
term, where the variable id
above behind
the vertical bar |
defines the subject i.e. cluster
factor. Notice that only one subject factor is allowed. See details.
formula
. By default the variables are taken from the
environment from which olmm
is called.family.olmm
object produced by
cumulative
, adjacent
or baseline
.lm
.olmm_control
.control
.olmm
. cumulative
,
adjacent
and baseline
yield an
object of class family.olmm
. The olmm
class is
a list containing the following components:"call"
).olmm_control
produced by
olmm_control
.terms
of the fitted model.family.olmm
that specifies
that family of the fitted model.coefficients
slot are restricted to an initial value
at the estimation.olmm_control
."list"
). The three implemented families are defined as follows:
cumulative
is defined as the link of the sum of
probabilities of lower categories, e.g., for link = "logit"
,
the logit of the sum of probabilities of lower
categories. adjacent
is defined as the logit of
the probability of the lower of two adjacent
categories. baseline
is defined as the logit of the
probability of a category with reference to the highest
category. Notice that the estimated coefficients of cumulative models
may have the opposite sign those obtained with alternative software.
For alternative fitting functions, see for example the
functions clmm
of ordinal,
nplmt
of package mixcat,
DPolmm
of package DPpackage,
lcmm
of package lcmm,
MCMCglmm
of package MCMCglmm or
OrdinalBoost
of package GMMBoost.
The implementation adopts functions of the packages statmod (Novomestky, 2012) and matrixcalc (Smyth et al., 2014), which is not visible for the user. The authors are grateful for these codes.
The formula
argument specifies the model to be
fitted. Categorical regression models distinguish between global
effects (or proportional-odds effects), which are defined with
ge
terms, and category-specific effects, which are
defined by ce
terms. For undefined terms, the
function will use ge
terms. Notice that this default
does not necessarily yield interpretable outputs. For example, for the
baseline
model you may use only ce
terms, and you have to specifiy this manually. For
cumulative
models it is at present not possible to
specifiy ce
for the random effects component because
the internal, unconstraint integration would yield unusable predictor
values.
Tutz, G. and W. Hennevogl (1996). Random Effects in Ordinal Regression Models, Computational Statistics & Data Analysis 22(5), 537--557.
Tutz, G. (2012). Regression for Categorical Data. New York, USA: Cambridge Series in Statistical and Probabilistic Mathematics.
Novomestky, F. (2012). matrixcalc: Collection of Functions for Matrix Calculations. R package version 1.0-3. URL http://CRAN.R-project.org/package=matrixcalc
Smyth, G., Y. Hu, P. Dunn, B. Phipson and Y. Chen (2014). statmod: Statistical Modeling. R package version 1.4.20. URL http://CRAN.R-project.org/package=statmod
olmm-methods
, olmm_control
,
ordered
## ------------------------------------------------------------------- #
## Example 1: Schizophrenia
##
## Estimating the cumulative mixed models of
## Agresti (2010) chapters 10.3.1
## ------------------------------------------------------------------- #
data(schizo)
model.10.3.1 <-
olmm(imps79o ~ tx + sqrt(week) + re(1|id),
data = schizo, family = cumulative())
summary(model.10.3.1)
## ------------------------------------------------------------------- #
## Example 2: Movie critics
##
## Estimating three of several adjacent-categories
## mixed models of Hartzl et. al. (2001)
## ------------------------------------------------------------------- #
data(movie)
## model with category-specific effects for "review"
model.24.1 <- olmm(critic ~ ce(review) + re(1|movie, intercept = "ce"),
data = movie, family = adjacent())
summary(model.24.1)
Run the code above in your browser using DataLab