Continuous ordinal regression with logit link using I-splines to model the g function.
ocm( formula, data =NULL, scale =NULL, weights, link = c("logit","probit","cloglog","loglog","cauchit"), niters = c(500,500), conv_crit =0.01, n.int.knots =NULL, order =4, lambdas =NA)
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
scale: a vector of length 2 with the boundaries of the ordinal scale used. If not specified, the range of the data is used, and a warning is displayed.
weights: optional case weights in fitting. Defaults to 1.
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. Other options are "logit", "probit", "cloglog", "loglog", "cauchit".
niters: a vector of length 2 with the maximimum number of external and internal iterations used in the fitting algorithm. The internal algorithm estimates the parameters of the model conditional on the current values of λs, the smoothing parameters. The external algorithm estimates the values of λs conditional on the current estimates of the parameters of the model. Default is c(500,500)
conv_crit: the smoothing parameters λ's convergence criteria for the iterative process. Default is 0.01
n.int.knots: the number of internal knots used to compute the spline bases. The default (NULL) is round((n-1-order)*0.8) if in the interval [8,15], and 8 or 15 otherwise.
order: the order of the spline functions. The default is 4 (cubic splines).
lambdas: NA (the default) or a vector of length equal to the number of smoothing terms, including the g function and, optionally, the random effect terms and the smooters. If ``lambdas'' is a vector, each element λi can be a number, in which case the corresponding term is penalized using λi as smoothing parameter, zero, in which case the corresponding term is unpenalized, or NA, in which case the value of λi is estimated maximmizing the marginal posterior function.
Returns
an object of type ocm with the components listed below. Parameter estimates are in coefficients. - coefficients: parameter estimates
pars_obj: an object of class ocmpars carrying the parameter estimates and other properties of the regression terms
vcov: variance-covariance matrix
H: the Hessian matrix
logLik: value of the log-likelihood at the estimated optimum
penlogLik: value of the lenalized log-likelihood at the estimated optimum
v: vector of continuous scores
sample.size: sample size (can differ from the number of observations if the weights are different from 1)
edf: estimated degrees of freedom
df.residual: the residual degrees of freedom
nobs: number of observations
terms: model terms
call: call to fit the model
data: the data frame as in input, ordered by the outcome values
model.frame: the model.frame used in the fit
model.matrix: the model.matrix used in the fit
weights: case weights in fitting
sorting: the ordinal score v sorting vector
link: link function used
formula: formula used
scale: the boundaries of the ordinal scale used
Details
Fits a continuous ordinal regression model using penalized maximum likelihood. The model can contain fixed effects and optionally mixed effects and smoothers. The g function is estimated using monotone increasing I-splines, and the link function is the logit, implying the standard logistic distribution for the latent variable. Penalized maximum likelihood estimation is performed using the MI algorithm and the splines smoothing parameters are estimated maximizing the marginal posterior (details of the iterative process are printed out during the fit).
Examples
fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100))summary(fit.overall)## Not run:plot(fit.overall)## Smoothers and complete data setfit.overall.smooth <- ocm(overall ~ age + treatment : s(cycleno), data=ANZ0001, scale=c(0,100))summary(fit.overall.smooth)plot(fit.overall.smooth)## End(Not run)
References
Manuguerra M, Heller GZ (2010). Ordinal Regression Models for Continuous Scales, The International Journal of Biostatistics: 6(1), Article 14.
Manuguerra M, Heller GZ, Ma J (2017). Semi-parametric Ordinal Regression Models for Continuous Scales, Proceedings of the 32nd International Workshop on Statistical Modelling. July 3-7, 2017, Groningen, Netherlands.
Manuguerra M, Heller GZ, Ma J (2020). Continuous Ordinal Regression for Analysis of Visual Analogue Scales: The R Package ordinalCont, Journal of Statistical Software. 96(8). doi:10.18637/jss.v096.i08