monoTestConfReg: Monotonicity test using confidence regions

View source: R/monoTestConfReg.R

monoTestConfRegR Documentation

Monotonicity test using confidence regions

Description

Tests the null hypothesis of monotonicity over a set of parameters associated to an ordinal predictor. The log-likelihood ratio test is used after imposing ordinal constraints on the parameter estimates of a single ordinal predictor and comparing its results against the unconstrained MLEs.

Usage

monoTestConfReg(formula, data = NULL, monoDir = NULL, SignifLevel = 0.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.

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", -1 for "antitonic", and 0 o test monotonicity of the prameters of an ordinal predictor. 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. If monoDir is not used (default option), the monotonicity of all ordinal predictors' effects are tested.

SignifLevel

Numerical value for the significance level.

Value

resConfRegTest: Data frame with columns: OPName=Name of the ordinal predictor (OP), Num_Cat=Number of categories of the OP, UMLE_logLik=log-likelihood of the unconstrained model, CMLE_logLik=log-likelihood of the constrained model using mdcp assuming monotonicity for each OP, degreesOfFreedom=degrees of freedom used in the hypothesis test, Statistic=value of the statistic, CritValue=critical value resulting from the statistic, SignifLevel=significance level used in the test, P.Value=p-value, RejectMonotonicity=TRUE if the null hypothesis of monotonicity is rejected, FALSE otherwise.

See Also

mdcp, monoTestBonf, confRegUCRandUCCR, confRegCCR, plotCMLE, vlgm.

Examples

# Ordinal predictors: EduLevel, IncQuint and Health
  monoTestConfRegExample <- monoTestConfReg(QoL ~ EduLevel + Age + IncQuint + Gender +
  Health, data = crovData, monoDir=c(0,-1,-1), SignifLevel = 0.05)
  monoTestConfRegExample$resConfRegTest

crov documentation built on Aug. 25, 2023, 5:15 p.m.

Related to monoTestConfReg in crov...