| monoTestConfReg {crov} | R 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 |
data |
A data.frame, list or environment (or object coercible by |
monoDir |
Vector with monotonicity directions for the ordinal predictors to be used as constraints. Possible values for |
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