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
)
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.
an optional data frame in which to interpret the variables occurring in the formulas
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.
optional case weights in fitting. Defaults to 1.
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".
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 \(\lambda\)s, the smoothing parameters.
The external algorithm estimates the values of \(\lambda\)s conditional on the current
estimates of the parameters of the model. Default is c(500,500)
the smoothing parameters \(\lambda\)'s convergence criteria for the iterative process. Default is \(0.01\)
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.
the order of the spline functions. The default is 4 (cubic splines).
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 \(\lambda_i\) can be a number, in which case the corresponding term is penalized using \(\lambda_i\) as smoothing parameter, zero, in which case the corresponding term is unpenalized, or NA, in which case the value of \(\lambda_i\) is estimated maximmizing the marginal posterior function.
an object of type ocm
with the components listed below. Parameter estimates are in coefficients
.
parameter estimates
an object of class ocmpars
carrying the parameter estimates and other properties of the regression terms
variance-covariance matrix
the Hessian matrix
value of the log-likelihood at the estimated optimum
value of the lenalized log-likelihood at the estimated optimum
vector of continuous scores
sample size (can differ from the number of observations if the weights are different from 1)
estimated degrees of freedom
the residual degrees of freedom
number of observations
model terms
call to fit the model
the data frame as in input, ordered by the outcome values
the model.frame used in the fit
the model.matrix used in the fit
case weights in fitting
the ordinal score v sorting vector
link function used
formula used
the boundaries of the ordinal scale used
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).
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
# NOT RUN {
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 set
fit.overall.smooth <- ocm(overall ~ age + treatment : s(cycleno), data=ANZ0001, scale=c(0,100))
summary(fit.overall.smooth)
plot(fit.overall.smooth)
# }
Run the code above in your browser using DataLab