Learn R Programming

ordinalCont (version 0.4)

ocmm: Ordinal regression for continuous scales with mixed effects

Description

Fits an ordinal continuous mixed model with logit link, using the generalized logistic function as g function.

Usage

ocmm(formula, data = NULL, weights, start = NULL, link = c("logit"), gfun = c("glf"), method = c("optim", "ucminf"), quad = c("Laplace", "GH"), n_nodes = 10)

Arguments

formula
a formula expression as for regression models, of the form response ~ predictors. Only mixed-effects models with a single random effect on the intercept are supported. The model must have an intercept: attempts to remove one will lead to a warning and will be ignored.
data
an optional data frame in which to interpret the variables occurring in the formulas
weights
optional case weights in fitting. Defaults to 1.
start
a vector of initial values for the regression coefficients, M, B, T, (offset, slope and symmetry of the g function) and the standard deviation of the random effect
link
link function, i.e., the type of location-scale distribution assumed for the latent distribution. The default logit link gives the proportional odds model and is the only link function currently supported.
gfun
A smooth monotonic function capable of capturing the non-linear nature of the ordinal measure. It defaults to the generalized logistic function (g_glf), which is currently the only possibility.
method
The optimizer used to maximize the likelihood function.
quad
A string indicating the type of quadrature used to integrate over the random effects. Can take values "Laplace" (Adaptive Gauss-Hermite quadrature using Laplace approximation; the default) or "GH" (Gauss-Hermite quadrature).
n_nodes
order of Gauss-Hermite rule used (number of nodes)

Value

An object of type ocmm with the components listed below.
coefficients
parameter estimates. The first len_beta elements are the estimates of the fixed-effects parameters; the last 4 elements are the estimates of the parameters of the g function (M, B, and T) and the standard deviation of the random effect.
vcov
variance-covariance matrix, of dimension (len_beta +4)x(len_beta +4 )
sigma_rnd
standard deviation of the random effect
df
estimated degrees of freedom
logLik
value of the log-likelihood at the estimated optimum
len_beta
number of fixed-effects parameters of the model
len_gfun
number of parameters in the g function used in the model
len_rnd
number of random effects (1 in this version of the package)
fitted.values
fitted probabilities
residuals
residuals on the latent scale
v
vector of continuous scores
x
model matrix
sample.size
sample size (can differ from the number of observations if the weights are different from 1)
nobs
number of observations
call
call to fit the model
no.pars
total number of parameters estimated
data
data frame used
link
link function used
gfun
g function used
formula
formula used

Details

Fits a continuous ordinal regression model, with fixed and random effects. The g function is the generalized logistic function (see g_glf), and the link function is the logit, implying the standard logistic distribution for the latent variable. Maximum likelihood estimation is performed, using optim {stats} with a quasi-Newton method ("BFGS"). Either adaptive Gauss-Hermite quadrature with the Laplace approximation, or Gauss-Hermite quadrature, is used. For continuous ordinal modelling with fixed effects only, see ocm.

Examples

Run this code
## Not run: 
# fit.overall.rnd  <- ocmm(overall  ~ cycleno + age + bsa + treatment + (1|randno), data=ANZ0001)
# fit.phys.rnd     <- ocmm(phys 	   ~ cycleno + age + bsa + treatment + (1|randno), data=ANZ0001)
# fit.pain.rnd 	  <- ocmm(pain 	   ~ cycleno + age + bsa + treatment + (1|randno), data=ANZ0001)
# fit.mood.rnd 	  <- ocmm(mood 	   ~ cycleno + age + bsa + treatment + (1|randno), data=ANZ0001)
# fit.nausvom.rnd <- ocmm(nausvom ~ cycleno + age + bsa + treatment + (1|randno), data=ANZ0001)
# fit.appetite.rnd <- ocmm(appetite ~ cycleno + age + bsa + treatment + (1|randno), data=ANZ0001)
# summary(fit.overall.rnd)
# summary(fit.phys.rnd)
# summary(fit.pain.rnd)
# summary(fit.mood.rnd)
# summary(fit.nausvom.rnd)
# summary(fit.appetite.rnd)
# ## End(Not run)

Run the code above in your browser using DataLab