mdcp {crov}R Documentation

Monotonicity Direction Classification (MDC) procedure

Description

Fits a constrained regression model for an ordinal response with ordinal predictors and possibly others, Espinosa and Hennig (2019) <DOI:10.1007/s11222-018-9842-2>. The parameter estimates associated with an ordinal predictor are constrained to be monotonic. If a monotonicity direction (isotonic or antitonic) is not specified for an ordinal predictor (OP) by the user, then a constrained method to be indicated in the option method establishes it or the approach that tries all possible combinations of monotonicity directions an the chooses the one with maximum likelihood.

Usage

mdcp(
  formula,
  data = NULL,
  tryAllMonoDir = FALSE,
  monoDir = NULL,
  CLS1 = 0.95,
  TLBS2 = 0.85,
  TLNS2 = 0.999,
  StepSizeCLS2 = 1e-04,
  method = NULL,
  monoTestSignLevel = 0.05,
  reltol = 1e-05,
  mu = 1e-04,
  outer.eps = 1e-05
)

Arguments

formula

A formula to be fitted with ordinal response, one or more ordinal predictors, and possibly one or more other predictors. For ordinal response and ordinal predictors use ordered factors.

data

A data.frame, list or environment (or object coercible by as.data.frame to a data.frame), containing the variables in formula. Neither a matrix nor an array will be accepted.

tryAllMonoDir

A logical value that indicates whether one model should be fitted for each one of the possible combinations of monotonicity directions of the ordinal predictors' effects. Use TRUE if no constrained method is used in method.

monoDir

Vector with monotonicity directions for the ordinal predictors to be used as constraints. Possible values for monoDir are 1, 0 and -1. Use 1 for "isotonic" and -1 for "antitonic". If the monotonicity direction of the prameters of an ordinal predictor has to be estimated, then use 0, which also allows to drop the monotonicity assumption when method is not "MDCS3". The order of the elements in monoDir must be the same as the order of the ordinal predictors in the object formula, i.e., the j-th element of monoDir must correspond to the monotonicity direction of the j-th ordinal predictor in formula. For example, monoDir=c(0,-1,-1,1,0) indicates that the monotonicity direction of the effects of the first OP will be estimated; the monotonicity direction of the effects of the second and third OPs are antitonic; the monotonicity direction of the effects of the fourth OP isotonic; and the monotonicity direction of the effects of the fifth OP will also be estimated. If tryAllMonoDir and monoDir are not used (default option), the monotonicity direction classification prodecure is executed on all of the ordinal predictors to find the monotonicity directions associated to the model with the maximum log-likelihood.

CLS1

Numerical value for the confidence level to be used in the first step of the MDC procedure. This parameter is active if tryAllMonoDir is not used.

TLBS2

Numerical value for the tolerance level to be used in the second step of the MDC procedure over those ordinal predictors classified as "Both" in the first step. This parameter is active if tryAllMonoDir and monoDir are not used.

TLNS2

Numerical value for the tolerance level to be used in the second step of the MDC procedure over those ordinal predictors classified as "None" in the first step. This parameter is active if tryAllMonoDir and monoDir are not used.

StepSizeCLS2

Numerical value for the magnitude in which the confidence levels will be increased or decreased during the second step of the MDC procedure. This parameter is active if tryAllMonoDir and monoDir are not used.

method

The type of constrained method to be used among "MDCS1", "MDCS2", "MDCS3", "CMLEbonferroni", "CMLEconfReg", and "CMLEfiltered". Default value is "MDCS3". "MDCS1" uses the first step of the MDC procedure described in Espinosa, J. and Christian H. (2019) to drop the monotonicity constraints on those ordinal predictors (OPs) classified as "both" or "none". "MDCS2" uses the second step of the MDC procedure described in Espinosa, J. and Christian H. (2019) to drop the monotonicity constraints on those OPs classified as "both" or "none". "MDCS3" performs the three steps of the MDC procedure described in Espinosa, J. and Christian H. (2019) and does not drop monotonicity constraints on the OPs, being the most restrictive method. "CMLEbonferroni" tests the null hypothesis of monotonic effects for an OP as described in Espinosa, J. and Christian H. (2019) and drops the monotonicity constraints on those OPs for which the monotonicity test rejects the null hypothesis. "CMLEconfReg" tests the null hypothesis of monotonic effects for an OP based on the analysis of confidence regions and drops the monotonicity constraints on those OPs for which the monotonicity test rejects the null hypothesis. "CMLEfiltered" uses the first step of the MDC procedure described in Espinosa, J. and Christian H. (2019) to drop the monotonicity constraints on those ordinal predictors (OPs) classified as "none".

monoTestSignLevel

Significance level used when method is "CMLEbonferroni" or "CMLEconfReg". Default value 0.05.

reltol

Passed to constrOptim().

mu

Passed to constrOptim().

outer.eps

Passed to constrOptim().

Value

MDCproc: Data frame with the monotonicity direction classification (Isotonic, Antitonic, Both, or None) used for each ordinal predictor in each one of the steps of the MDC procedure (S1, S2 and S3), together with their individual confidence levels (CL). If monoDir is used, MDCproc shows the monotonicity directions in monoDir.

estimates: Vector of parameter estimates of the model.

log.lik: Value of the log-likelihood of the model.

allModels: Data frame with monotonicity directions, log-likelihood and parameter estimates of all models involved in the third step of the MDC procedure. If parameter monoDir is used, allModels shows these results from the model with monotonicity directions used in monoDir only. If parameter tryAllMonoDir is used, allModels shows these results from all the models according to all possible combinations of monotonicity directions.

constrOptimRes: List with the outcomes provided by the function constrOptim.

UMLE: Vector with the parameter estimates of the unconstrained version of the model.

UMLE_SE: Vector with the standard errors of the unconstrained version of the model.

q_cat_OrdPred: Vector with the number of ordinal categories for each ordinal predictor. Values are displayed in the same order as the ordinal predictors are incorporated in formula.

References

Espinosa, J., and Hennig, C. "A constrained regression model for an ordinal response with ordinal predictors." Statistics and Computing 29.5 (2019): 869-890. https://doi.org/10.1007/s11222-018-9842-2.

See Also

monoTestBonf, monoTestConfReg, confRegUCRandUCCR, confRegCCR, plotCMLE, constrOptim.

Examples

# Ordinal predictors: EduLevel, IncQuint and Health,
mdcpExample <- mdcp(QoL ~ EduLevel + Age + IncQuint + Gender + Health, data = crovData,
CLS1 = 0.95, TLBS2 = 0.90, TLNS2 = 0.99, StepSizeCLS2 = 0.0002)
mdcpExample$MDCproc
cbind("CMLE"=mdcpExample$estimates,"UMLE"=mdcpExample$UMLE)
mdcpExample$UMLE_SE
mdcpExample$log.lik
mdcpExample$allModels[1:6]

[Package crov version 0.3.0 Index]