Learn R Programming

ordinalCont (version 0.4)

ocm: Ordinal regression for continuous scales

Description

Continuous ordinal regression with logit link using the generalized logistic function as g function.

Usage

ocm(formula, data = NULL, weights, start = NULL, link = c("logit"), gfun = c("glf"), method = c("optim", "ucminf"))

Arguments

formula
a formula expression as for regression models, of the form response ~ predictors. Only fixed effects 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 and M, B, T, (offset, slope and symmetry of the g function)
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, which is currently the only possibility.
method
The optimizer used to maximize the likelihood function.

Value

an object of type ocm with the components listed below. Parameter estimates are in coefficients. The last 3 elements of coefficients are the parameters of the g function: M, B, and T.
coefficients
parameter estimates
vcov
variance-covariance matrix
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
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 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"). For continuous ordinal mixed modelling, see ocmm.

References

Manuguerra M, Heller GZ (2010). Ordinal Regression Models for Continuous Scales, The International Journal of Biostatistics: 6(1), Article 14.

See Also

For continuous ordinal mixed models, see ocmm

Examples

Run this code
ANZ0001.ocm <- ANZ0001[ANZ0001$cycleno==0 | ANZ0001$cycleno==5,]
ANZ0001.ocm$cycleno[ANZ0001.ocm$cycleno==5] <- 1
fit.overall  <- ocm(overall  ~ cycleno + age + bsa + treatment, data=ANZ0001.ocm)
fit.phys 	  <- ocm(phys 	  ~ cycleno + age + bsa + treatment, data=ANZ0001.ocm)
fit.pain 	  <- ocm(pain 	  ~ cycleno + age + bsa + treatment, data=ANZ0001.ocm)
fit.mood 	  <- ocm(mood 	  ~ cycleno + age + bsa + treatment, data=ANZ0001.ocm)
fit.nausvom  <- ocm(nausvom  ~ cycleno + age + bsa + treatment, data=ANZ0001.ocm)
fit.appetite <- ocm(appetite ~ cycleno + age + bsa + treatment, data=ANZ0001.ocm)
summary(fit.overall)
summary(fit.phys)
summary(fit.pain)
summary(fit.mood)
summary(fit.nausvom)
summary(fit.appetite)
par(mfrow=c(2,3))
plot(fit.overall, CIs='vcov', R=100)
plot(fit.phys, CIs='vcov', R=100)
plot(fit.pain, CIs='vcov', R=100)
plot(fit.mood, CIs='vcov', R=100)
plot(fit.nausvom, CIs='vcov', R=100)
plot(fit.appetite, CIs='vcov', R=100)
par(mfrow=c(1,1))

Run the code above in your browser using DataLab