Title: | Ordinal Regression Analysis for Continuous Scales |
---|---|
Description: | A regression framework for response variables which are continuous self-rating scales such as the Visual Analog Scale (VAS) used in pain assessment, or the Linear Analog Self-Assessment (LASA) scales in quality of life studies. These scales measure subjects' perception of an intangible quantity, and cannot be handled as ratio variables because of their inherent non-linearity. We treat them as ordinal variables, measured on a continuous scale. A function (the g function) connects the scale with an underlying continuous latent variable. The link function is the inverse of the CDF of the assumed underlying distribution of the latent variable. A variety of link functions are currently implemented. Such models are described in Manuguerra et al (2020) <doi:10.18637/jss.v096.i08>. |
Authors: | Maurizio Manuguerra [aut, cre], Gillian Heller [aut] |
Maintainer: | Maurizio Manuguerra <[email protected]> |
License: | GPL (>= 2) |
Version: | 2.0.2 |
Built: | 2024-11-20 03:18:55 UTC |
Source: | https://github.com/cran/ordinalCont |
Regression analysis of continous ordinal data via cumulative link models and cumulative link mixed models. The package can be used to fit a variety of transformation models.
Ordinal regression analysis is a convenient tool for analyzing ordinal response variables
in the presence of covariates. We extend this methodology to the case of continuous self-rating
scales such as the Visual Analog Scale (VAS) used in pain assessment, or the Linear Analog
Self-Assessment (LASA) scales in quality of life studies. Subjects are
typically given a linear scale of 100 mm and asked to put a mark where they perceive
themselves. These scales measure subjects'
perception of an intangible quantity, and cannot be handled as ratio variables because of their
inherent nonlinearity. Instead we treat them as ordinal variables, measured on a continuous scale. We
express the likelihood in terms of a function (the “g function”) connecting the
scale with an underlying continuous latent variable. In the current version the g function
is expressed with monotone increasing I-splines (Ramsey 1988).
The link function is the inverse of the CDF of the assumed underlying distribution of the
latent variable. Currently
the logit link, which corresponds to a standard logistic distribution, is implemented.
(This implies a proportional odds model.) The likelihood is
maximized using the MI
algorithm (Ma, 2010). Fixed- and mixed-effects models are implemented
in the function ocm
.
Maurizio Manuguerra, Gillian Heller
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 (2010). Ordinal Regression Models for Continuous Scales, The International Journal of Biostatistics: 6(1), Article 14.
Heller, GZ, Manuguerra M, Chow R (2016). How to analyze the Visual Analogue Scale: Myths, truths and clinical relevance, Scandinavian Journal of Pain, Volume 13, 67 - 75
Ma, J. (2010). Positively Constrained Multiplicative Iterative Algorithm for Maximum Penalized Likelihood Tomographic Reconstruction, Nuclear Science 57 (1): 181-92.
Ramsay, J. O. (1988). Monotone regression splines in action. Statistical science, 425-441.
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
Comparison of continuous ordinal models using likelihood ratio tests.
## S3 method for class 'ocm' anova(object, ...)
## S3 method for class 'ocm' anova(object, ...)
object |
an object of class |
... |
one or more additional |
Likelihood ratio testing of nested models is performed.
The method returns an object of class anova.ocm
and data.frame
, reporting for each model, in hierarchical order:
no.par |
number of parameters |
AIC |
Akaike information criterion |
loglik |
log-likelihood |
LR.stat |
likelihood ratio statistic |
df |
difference in the degrees of freedom in the models being compared |
Pr(>Chisq) |
p-value from the likelihood ratio test |
Maurizio Manuguerra, Gillian Heller
@seealso ocm
, print.anova.ocm
## Not run: fit.overall <- ocm(overall ~ cycleno + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) anova(fit.overall, update(fit.overall, .~. + age)) ## End(Not run)
## Not run: fit.overall <- ocm(overall ~ cycleno + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) anova(fit.overall, update(fit.overall, .~. + age)) ## End(Not run)
The complete ANZ0001 trial data set
data(ANZ0001)
data(ANZ0001)
A data frame with 2473 rows and 11 variables
The ANZ0001 trial, conducted by the ANZ Breast Cancer Trials Group, is an unblinded, multi-centre, randomized trial with three chemotherapy treatment arms, concluded in 2005 (Stockler et al 2007). Health-related quality of life measures (Overall quality of life, Physical Well-Being, Mood, Pain, Nausea and Vomiting, Appetite) are assessed at each chemotherapy treatment cycle, from randomization until disease progression, when treatment is interrupted. The treatments Intermittent Capecitabine (IC) and Continuous Capecitabine (CC) are compared with the standard combination treatment CMF, each with its own protocol. There is no maximum duration of treatment, but it is interrupted on disease progression, or when patient intolerance or unacceptable toxicity are recorded. The data set is extracted from the ANZ0001 trial and contains information from 292 patients with complete quality of life measurements.
The variables are as follows:
randno
|
patient ID number |
cycleno
|
chemotherapy cycle number |
age
|
age of patient at entry to study |
bsa
|
Body Surface Area (m ) |
treatment
|
treatment received by patient (1,2,3) |
overall
|
Overall quality of life as recorded by the patient on a LASA scale, normalized to (0, 1) |
phys
|
Physical Well-Being as recorded by the patient on a LASA scale, normalized to (0, 1) |
mood
|
Mood as recorded by the patient on a LASA scale, normalized to (0, 1) |
pain
|
Pain as recorded by the patient on a LASA scale, normalized to (0, 1) |
nausvom
|
Nausea and Vomiting as recorded by the patient on a LASA scale, normalized to (0, 1) |
appetite
|
Appetite as recorded by the patient on a LASA scale, normalized to (0, 1) |
Stockler, M., T. Sourjina, P. Grimison, V. Gebski, M. Byrne, V. Harvey, P. Francis et al. “A randomized trial of capecitabine (C) given intermittently (IC) rather than continuously (CC) compared to classical CMF as first-line chemotherapy for advanced breast cancer (ABC).” In ASCO Annual Meeting Proceedings, vol. 25, no. 18_suppl, p. 1031. 2007.
A subset from the ANZ0001 trial data set
data(ANZ0001.sub)
data(ANZ0001.sub)
A data frame with 428 rows and 11 variables
The ANZ0001 trial, conducted by the ANZ Breast Cancer Trials Group, is an unblinded, multi-centre, randomized trial with three chemotherapy treatment arms, concluded in 2005 (Stockler et al 2007). Health-related quality of life measures (Overall quality of life, Physical Well-Being, Mood, Pain, Nausea and Vomiting, Appetite) are assessed at each chemotherapy treatment cycle, from randomization until disease progression, when treatment is interrupted. The treatments Intermittent Capecitabine (IC) and Continuous Capecitabine (CC) are compared with the standard combination treatment CMF, each with its own protocol. There is no maximum duration of treatment, but it is interrupted on disease progression, or when patient intolerance or unacceptable toxicity are recorded. The data set is extracted from the ANZ0001 trial and contains information from a subset of 292 patients with complete quality of life measurements, limited to cycle numbers 0 and 5.
The variables are as follows:
randno
|
patient ID number |
cycleno
|
chemotherapy cycle number, either 0 (initial assessment) or 1 (fifth cycle). |
age
|
age of patient at entry to study |
bsa
|
Body Surface Area (m ) |
treatment
|
treatment received by patient (1,2,3) |
overall
|
Overall quality of life as recorded by the patient on a LASA scale, normalized to (0, 1) |
phys
|
Physical Well-Being as recorded by the patient on a LASA scale, normalized to (0, 1) |
mood
|
Mood as recorded by the patient on a LASA scale, normalized to (0, 1) |
pain
|
Pain as recorded by the patient on a LASA scale, normalized to (0, 1) |
nausvom
|
Nausea and Vomiting as recorded by the patient on a LASA scale, normalized to (0, 1) |
appetite
|
Appetite as recorded by the patient on a LASA scale, normalized to (0, 1) |
Stockler, M., T. Sourjina, P. Grimison, V. Gebski, M. Byrne, V. Harvey, P. Francis et al. “A randomized trial of capecitabine (C) given intermittently (IC) rather than continuously (CC) compared to classical CMF as first-line chemotherapy for advanced breast cancer (ABC).” In ASCO Annual Meeting Proceedings, vol. 25, no. 18_suppl, p. 1031. 2007.
coef.ocm
is the ordinalCont specific method for the generic function coef
,
which extracts model coefficients from objects of class ocm
.
## S3 method for class 'ocm' coef(object, ...)
## S3 method for class 'ocm' coef(object, ...)
object |
an object of class |
... |
further arguments passed to or from other methods. |
A named numeric vector with the coefficients extracted from the model object.
Maurizio Manuguerra, Gillian Heller
Function to compute the derivatives of the link function needed by the algorithm
deriv_link(link = c("logit", "probit", "cloglog", "loglog", "cauchit"))
deriv_link(link = c("logit", "probit", "cloglog", "loglog", "cauchit"))
link |
One of "logit" (default), "probit", "cloglog", "loglog" or "cauchit". |
A list with the link function and the 1st, 2nd and 3rd derivatives with respect to the argument
Extracts the absolute conditional deviance for a fitted ocm
object
## S3 method for class 'ocm' deviance(object, ...)
## S3 method for class 'ocm' deviance(object, ...)
object |
|
... |
further arguments to be passed to methods |
The deviance is computed as:
where is the conditional penalized log-likelihood.
The value of the deviance extracted from object
.
Maurizio Manuguerra, Gillian Heller
## Not run: fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) deviance(fit.overall) ## End(Not run)
## Not run: fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) deviance(fit.overall) ## End(Not run)
Extracts the AIC for a fitted ocm
object
## S3 method for class 'ocm' extractAIC(fit, scale = 0, k = 2, ...)
## S3 method for class 'ocm' extractAIC(fit, scale = 0, k = 2, ...)
fit |
|
scale |
parameter currently not used. For compatibility with general extractAIC method. |
k |
“weight” of the equivalent degrees of freedom (=: edf) in the AIC formula. Defaults to 2 |
... |
further arguments to be passed to methods |
The generalized AIC is computed:
where is the log-likelihood, k=2 gives the AIC, and
k=log(n) gives the BIC.
A numeric vector of length 2, with first and second elements giving
edf |
the “equivalent degrees of freedom” for the fitted model |
AIC |
the generalized AIC of |
Maurizio Manuguerra, Gillian Heller
Akaike, H (1983). Information measures and model selection, Bulletin of the International Statistical Institute, 50:277-290.
## Not run: fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) extractAIC(fit.overall) ## End(Not run)
## Not run: fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) extractAIC(fit.overall) ## End(Not run)
fitted.ocm
is the ordinalCont specific method for the generic function fitted
,
which computes model fitted from objects of class ocm
.
## S3 method for class 'ocm' fitted(object, ...)
## S3 method for class 'ocm' fitted(object, ...)
object |
an object of class |
... |
further arguments passed to or from other methods. |
An object of class ocm
is used to compute the probability
densities of the continuous ordinal score. The fitted values are the means of such
probability density functions. The output is scaled following the original scale of the scores.
Fitted values computed from object
.
Maurizio Manuguerra, Gillian Heller
formula.ocm
is the ordinalCont specific method for the generic function formula
,
which extracts the model formula from objects of class ocm
.
## S3 method for class 'ocm' formula(x, ...)
## S3 method for class 'ocm' formula(x, ...)
x |
an object of class |
... |
further arguments passed to or from other methods. |
A symbolic model formula extracted from the model object.
Maurizio Manuguerra, Gillian Heller
Calculates the estimated g function for a fitted ocm
object
get_gfun(object, ...) ## S3 method for class 'ocm' get_gfun(object, ...)
get_gfun(object, ...) ## S3 method for class 'ocm' get_gfun(object, ...)
object |
an |
... |
further arguments to be passed to methods |
a dataframe containing four columns: the values of the score v, the estimated g function and the 95%CIs
NULL
Maurizio Manuguerra, Gillian Heller
## Not run: fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) get_gfun(fit.overall) ## End(Not run)
## Not run: fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) get_gfun(fit.overall) ## End(Not run)
Function to compute inverse link functions
inv_link(link = c("logit", "probit", "cloglog", "loglog", "cauchit"))
inv_link(link = c("logit", "probit", "cloglog", "loglog", "cauchit"))
link |
One of "logit" (default), "probit", "cloglog", "loglog" or "cauchit". |
A list with the link function and the 1st, 2nd and 3rd derivatives with respect to the argument
Extracts the log-likelihood for a fitted ocm
object
## S3 method for class 'ocm' logLik(object, ...)
## S3 method for class 'ocm' logLik(object, ...)
object |
an |
... |
further arguments to be passed to methods |
The log-likelihood of an ocm
object. This is a number with attributes
df |
estimated degrees of freedom for the fitted model |
nobs |
number of observations used in the fitted model |
class |
class of the returned object: |
Maurizio Manuguerra, Gillian Heller
## Not run: fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) logLik(fit.overall) ## End(Not run)
## Not run: fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) logLik(fit.overall) ## End(Not run)
model.frame.ocm
is the ordinalCont specific method for the generic function model.frame
,
which return a data.frame with the variables needed to use formula
and any ... arguments.
## S3 method for class 'ocm' model.frame(formula, data, random.terms = TRUE, ...)
## S3 method for class 'ocm' model.frame(formula, data, random.terms = TRUE, ...)
formula |
a model formula |
data |
a data.frame containing the variables in formula. |
random.terms |
a logical indicating if random terms have to be included in the terms object. Defaults to TRUE. |
... |
a mix of further arguments to pass to the default method. |
A c("data.frame") with the variables needed to obtain object
.
Maurizio Manuguerra, Gillian Heller
model.matrix.ocm
is the ordinalCont specific method for the generic function model.matrix
,
which extracts the model matrix from objects of class ocm
.
## S3 method for class 'ocm' model.matrix(object, random.terms = TRUE, ...)
## S3 method for class 'ocm' model.matrix(object, random.terms = TRUE, ...)
object |
an object of class |
random.terms |
a logical indicating if random terms have to be included in the terms object. Defaults to TRUE. |
... |
further arguments passed to or from other methods. |
A design (or model) matrix with the variables needed to obtain the object x
, e.g., by expanding factors to a set of dummy variables and expanding interactions similarly.
Maurizio Manuguerra, Gillian Heller
A subset from an Australian chronic neck pain study
data(neck_pain)
data(neck_pain)
A data frame with 264 rows and 4 variables
A randomized, double-blind, placebo-controlled study of low-level laser therapy (LLLT) in 88 subjects with chronic neck pain was conducted with the aim of determining the efficacy of 300 mW, 830 nm laser in the management of chronic neck pain. Subjects were randomized to receive a course of 14 treatments over 7 weeks with either active or sham laser to tender areas in the neck. The primary outcome measure was change in a 10 cm Visual Analogue Scale (VAS) for pain. Measurements were taken at baseline, at the end of 7 weeks\' treatment and 12 weeks from baseline.
The variables are as follows:
id
|
patient ID number |
vas
|
Neck pain as recorded by the patient on a VAS scale, normalized to (0, 1) |
laser
|
laser treatment received by patient, either 1 (active) or 2 (placebo) |
time
|
the measurement time, either 1 (initial assessment), 2 (after 7 weeks) or 3 (after 12 weeks). |
Chow RT, Heller GZ, Barnsley L (2006). “The effect of 300 mW, 830 nm laser on chronic neck pain: a double-blind, randomized, placebo-controlled study.” Pain, 124(1-2), 201-10. doi:16806710.
nobs.ocm
is the ordinalCont specific method for the generic function nobs
,
which returns number of observations from objects of class ocm
.
## S3 method for class 'ocm' nobs(object, ...)
## S3 method for class 'ocm' nobs(object, ...)
object |
an object of class |
... |
further arguments passed to or from other methods. |
The (numeric) number of observations in the model object.
Maurizio Manuguerra, Gillian Heller
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 )
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 )
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 |
conv_crit |
the smoothing parameters |
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 |
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).
an object of type ocm
with the components listed below. Parameter estimates are in coefficients
.
coefficients |
parameter estimates |
pars_obj |
an object of class |
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 |
Maurizio Manuguerra, Gillian Heller
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
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) ## End(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) ## End(Not run)
Draws several summary and diagnostic plots, including the estimated g function, the estimated density function of the continuous ordinal score for the null model (no covariates), the histogram of the quantile residuals, the normal Q-Q plot and any smoother included in the model.
## S3 method for class 'ocm' plot( x, plot.only = NULL, CIs = c("vcov", "no", "rnd.x.bootstrap", "fix.x.bootstrap", "param.bootstrap"), R = 100, main_gfun = "g function", main_density = "Density function when X=0", xlab = "Continuous ordinal scale [v]", CIcol = "lightblue", individual_plots = F, ... )
## S3 method for class 'ocm' plot( x, plot.only = NULL, CIs = c("vcov", "no", "rnd.x.bootstrap", "fix.x.bootstrap", "param.bootstrap"), R = 100, main_gfun = "g function", main_density = "Density function when X=0", xlab = "Continuous ordinal scale [v]", CIcol = "lightblue", individual_plots = F, ... )
x |
an object of class |
plot.only |
either NULL, in which case all plots are displayed, or a value among "gfun", "quant_resid", "QQplot" or "smoother", in which case only the requested plot is displayed. |
CIs |
method used for confidence bands for the g function. |
R |
the number of bootstrap replicates. Ignored if CIs= |
main_gfun |
title of the g function plot. Defauts to “g function (95% CIs)” |
main_density |
title of the density function plot. Defauts to “Density function when X=0” |
xlab |
label of the x axis for the g function and the density plots. Defaults to “Continuous ordinal scale [v]” |
CIcol |
color of the confidence interval bands. Defaults to “lightblue” |
individual_plots |
logical. If TRUE, every figure is drawn in a new window. If FALSE (default), the first four figures are drawn in a 2-by-2 array. |
... |
further arguments passed to or from other methods |
The estimated g function, quantile residual histogram and normal Q-Q plot of an ocm
object are plotted. If smothers are included in the formula, the user has the option to
plot them in the same graph or separately.
If CIs
is not "no"
, 95% confidence bands are also plotted.
Maurizio Manuguerra, Gillian Heller
fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) plot(fit.overall, CIs="vcov") ## Not run: plot(fit.overall, CIs="rnd.x.bootstrap", R=100) plot(fit.overall, CIs="fix.x.bootstrap", R=100) plot(fit.overall, CIs="param.bootstrap", R=100) ## End(Not run)
fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) plot(fit.overall, CIs="vcov") ## Not run: plot(fit.overall, CIs="rnd.x.bootstrap", R=100) plot(fit.overall, CIs="fix.x.bootstrap", R=100) plot(fit.overall, CIs="param.bootstrap", R=100) ## End(Not run)
Predicted values based on ocm
object
## S3 method for class 'ocm' predict( object, newdata = NULL, type = c("response", "density", "CDF", "quantile", "regressor", "exp_regressor", "hazard", "cum_hazard", "survival"), prob = 1:(K - 1)/K, K = 50, ... )
## S3 method for class 'ocm' predict( object, newdata = NULL, type = c("response", "density", "CDF", "quantile", "regressor", "exp_regressor", "hazard", "cum_hazard", "survival"), prob = 1:(K - 1)/K, K = 50, ... )
object |
an object of class |
newdata |
optionally, a data frame in which to look for variables with
which to predict.
Note that all predictor variables should be present, having the same names as the variables
used to fit the model. If |
type |
type of prediction. One of "response" (default), "density", "CDF", "quantile", "regressor", "exp_regressor", "hazard", "cum_hazard" or "survival" |
prob |
probabilities used to evaluate the quantile function (if |
K |
number of evenly spaced values of |
... |
further arguments passed to or from other methods |
An object of class ocm
and optionally a new data
frame are used to compute the predictions. The estimated parameters
of the fitted model and K
values of v
are used to compute the conditional probability density and the conditional cumulative distribution. If a new data frame is used to make predictions, the individual (random) effects are set to zero, while they are maintained to the estimated values if newdata
is NULL.
A vector of predictions, according to the type
.
Maurizio Manuguerra, Gillian Heller
## Not run: fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) pred <- predict(fit.overall) ## End(Not run)
## Not run: fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) pred <- predict(fit.overall) ## End(Not run)
Print the results of the comparison of continuous ordinal models in likelihood ratio tests.
## S3 method for class 'anova.ocm' print( x, digits = max(getOption("digits") - 2, 3), signif.stars = getOption("show.signif.stars"), ... )
## S3 method for class 'anova.ocm' print( x, digits = max(getOption("digits") - 2, 3), signif.stars = getOption("show.signif.stars"), ... )
x |
an object of class |
digits |
controls the number of digits to print. Defaults to the maximum of the value returned by (getOption("digits") - 2) and 3 |
signif.stars |
a logical. Should the significance stars be printed? Defaults to the value returned by getOption("show.signif.stars") |
... |
further arguments passed to or from other methods |
Prints anova.ocm
object
Maurizio Manuguerra, Gillian Heller
print.ocm
is the ordinalCont specific method for the generic function print
,
which prints objects of class ocm
.
## S3 method for class 'ocm' print(x, ...)
## S3 method for class 'ocm' print(x, ...)
x |
an object of class |
... |
further arguments passed to or from other methods. |
Prints an ocm
object.
Maurizio Manuguerra, Gillian Heller
Summary method for class ocm
## S3 method for class 'ocm' summary(object, full = F, ...)
## S3 method for class 'ocm' summary(object, full = F, ...)
object |
an object of class |
full |
logical, if TRUE (the default) all the parameters are printed; if FALSE, only the fixed effects are printed. |
... |
further arguments passed to or from other methods |
Maurizio Manuguerra, Gillian Heller
fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) summary(fit.overall)
fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) summary(fit.overall)
terms.ocm
is the ordinalCont specific method for the generic function terms
,
which extracts model terms from objects of class ocm
.
## S3 method for class 'ocm' terms(x, random.terms = TRUE, ...)
## S3 method for class 'ocm' terms(x, random.terms = TRUE, ...)
x |
an object of class |
random.terms |
a logical indicating if random terms have to be included in the terms object. Defaults to TRUE. |
... |
further arguments passed to or from other methods. |
An object of class c("terms", "formula") which contains the terms representation of a symbolic model.
Maurizio Manuguerra, Gillian Heller
Calculates variance-covariance matrix for a fitted ocm
object
## S3 method for class 'ocm' vcov(object, ...)
## S3 method for class 'ocm' vcov(object, ...)
object |
an |
... |
further arguments to be passed to methods |
For the generalized logistic g-function, the variance-covariance matrix of model parameters includes information on fixed- and random- effect terms and smoothing terms.
Variance-covariance matrix of model parameters
Maurizio Manuguerra, Gillian Heller
## Not run: fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) vcov(fit.overall) ## End(Not run)
## Not run: fit.overall <- ocm(overall ~ cycleno + age + bsa + treatment, data=ANZ0001.sub, scale=c(0,100)) vcov(fit.overall) ## End(Not run)