R Markdown
library(OptimalCutpoints)
data(elas)
str(elas)
## 'data.frame': 141 obs. of 3 variables:
## $ elas : num 27 34 41 20 25 26 42 126 21 116 ...
## $ status: int 1 1 1 0 1 1 0 1 0 1 ...
## $ gender: Factor w/ 2 levels "Female","Male": 2 2 2 1 1 2 2 2 2 2 ...
# Youden Index Method ("Youden"): Covariate gender
optimal.cutpoint.Youden<-optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "Youden", data = elas, pop.prev = NULL, categorical.cov =
"gender", control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.Youden)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "Youden", data = elas, categorical.cov = "gender",
## pop.prev = NULL, control = control.cutpoints(), ci.fit = TRUE,
## conf.level = 0.95, trace = FALSE)
##
## *************************************************
## Female
## *************************************************
##
## Area under the ROC curve (AUC): 0.818 (0.684, 0.952)
##
## CRITERION: Youden
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 46.0000000 - -
## Se 0.6666667 0.3838037 0.8817589
## Sp 0.8181818 0.5971542 0.9481327
## PPV 0.7142857 0.4516107 0.9031160
## NPV 0.7826087 0.5285570 0.9359958
## DLR.Positive 3.6666667 1.4096667 9.5373214
## DLR.Negative 0.4074074 0.1939348 0.8558589
## FP 4.0000000 - -
## FN 5.0000000 - -
## Optimal criterion 0.4848485 - -
##
##
## *************************************************
## Male
## *************************************************
##
## Area under the ROC curve (AUC): 0.722 (0.612, 0.831)
##
## CRITERION: Youden
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 38.0000000 - -
## Se 0.6543210 0.5404147 0.7565737
## Sp 0.7391304 0.5159480 0.8977139
## PPV 0.8983051 0.7686835 0.9355009
## NPV 0.3777778 0.2738718 0.6528595
## DLR.Positive 2.5082305 1.2382379 5.0807845
## DLR.Negative 0.4676834 0.3180320 0.6877538
## FP 6.0000000 - -
## FN 28.0000000 - -
## Optimal criterion 0.3934514 - -
plot(optimal.cutpoint.Youden)

## Press return for next page....

## Press return for next page....

## Press return for next page....

# Youden Index Method ("Youden"):no covariate
optimal.cutpoint.Youden2<-optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "Youden", data = elas, pop.prev = NULL, control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.Youden2)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "Youden", data = elas, pop.prev = NULL, control = control.cutpoints(),
## ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
##
## Area under the ROC curve (AUC): 0.744 (0.659, 0.828)
##
## CRITERION: Youden
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 37.0000000 - -
## Se 0.6875000 0.5848184 0.7782474
## Sp 0.6666667 0.5104964 0.7999943
## PPV 0.8148148 0.6964499 0.8752971
## NPV 0.5000000 0.3903427 0.6666588
## DLR.Positive 2.0625000 1.3354513 3.1853698
## DLR.Negative 0.4687500 0.3265302 0.6729134
## FP 15.0000000 - -
## FN 30.0000000 - -
## Optimal criterion 0.3541667 - -
plot(optimal.cutpoint.Youden2)

## Press return for next page....

# Change the method for computing the confidence interval of Sensitivity and Specificity
optimal.cutpoint.Youden3<-optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "Youden", data = elas, pop.prev = NULL, categorical.cov = "gender",
control = control.cutpoints(ci.SeSp = "AgrestiCoull"), ci.fit = TRUE, conf.level = 0.95,
trace = FALSE)
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.Youden3)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "Youden", data = elas, categorical.cov = "gender",
## pop.prev = NULL, control = control.cutpoints(ci.SeSp = "AgrestiCoull"),
## ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
##
## *************************************************
## Female
## *************************************************
##
## Area under the ROC curve (AUC): 0.818 (0.684, 0.952)
##
## CRITERION: Youden
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 46.0000000 - -
## Se 0.6666667 0.4171355 0.8482368
## Sp 0.8181818 0.6148339 0.9269312
## PPV 0.7142857 0.4516107 0.9031160
## NPV 0.7826087 0.5285570 0.9359958
## DLR.Positive 3.6666667 1.4096667 9.5373214
## DLR.Negative 0.4074074 0.1939348 0.8558589
## FP 4.0000000 - -
## FN 5.0000000 - -
## Optimal criterion 0.4848485 - -
##
##
## *************************************************
## Male
## *************************************************
##
## Area under the ROC curve (AUC): 0.722 (0.612, 0.831)
##
## CRITERION: Youden
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 38.0000000 - -
## Se 0.6543210 0.5458938 0.7487735
## Sp 0.7391304 0.5353000 0.8745138
## PPV 0.8983051 0.7686835 0.9355009
## NPV 0.3777778 0.2738718 0.6528595
## DLR.Positive 2.5082305 1.2382379 5.0807845
## DLR.Negative 0.4676834 0.3180320 0.6877538
## FP 6.0000000 - -
## FN 28.0000000 - -
## Optimal criterion 0.3934514 - -
plot(optimal.cutpoint.Youden3)

## Press return for next page....

## Press return for next page....

## Press return for next page....

# Compute the Generalized Youden Index
optimal.cutpoint.Youden4<-optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "Youden", data = elas, pop.prev = NULL, categorical.cov = "gender",
control = control.cutpoints(generalized.Youden = TRUE), ci.fit = TRUE, conf.level = 0.95,
trace = FALSE)
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.Youden4)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "Youden", data = elas, categorical.cov = "gender",
## pop.prev = NULL, control = control.cutpoints(generalized.Youden = TRUE),
## ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
##
## *************************************************
## Female
## *************************************************
##
## Area under the ROC curve (AUC): 0.818 (0.684, 0.952)
##
## CRITERION: Youden
## Number of optimal cutoffs: 2
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 46.0000000 - -
## Se 0.6666667 0.3838037 0.8817589
## Sp 0.8181818 0.5971542 0.9481327
## PPV 0.7142857 0.4516107 0.9031160
## NPV 0.7826087 0.5285570 0.9359958
## DLR.Positive 3.6666667 1.4096667 9.5373214
## DLR.Negative 0.4074074 0.1939348 0.8558589
## FP 4.0000000 - -
## FN 5.0000000 - -
## Optimal criterion 0.8666667 - -
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 60.0000000 - -
## Se 0.4000000 0.1633643 0.6771302
## Sp 1.0000000 0.8456275 NaN
## PPV 1.0000000 0.5990306 1.0000000
## NPV 0.7096774 0.4172378 NaN
## DLR.Positive Inf NaN Inf
## DLR.Negative 0.6000000 0.3969193 0.9069854
## FP 0.0000000 - -
## FN 9.0000000 - -
## Optimal criterion 0.8666667 - -
##
##
## *************************************************
## Male
## *************************************************
##
## Area under the ROC curve (AUC): 0.722 (0.612, 0.831)
##
## CRITERION: Youden
## Number of optimal cutoffs: 2
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 21.00000000 - -
## Se 0.96296296 0.89555629 0.9922960
## Sp 0.26086957 0.10228613 0.4840520
## PPV 0.82105263 0.59697391 0.9578589
## NPV 0.66666667 0.39743777 0.8416808
## DLR.Positive 1.30283224 1.01818356 1.6670588
## DLR.Negative 0.14197531 0.03845178 0.5242147
## FP 17.00000000 - -
## FN 3.00000000 - -
## Optimal criterion 0.03703704 - -
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 22.00000000 - -
## Se 0.95061728 0.8783619 0.9863829
## Sp 0.30434783 0.1321029 0.5291917
## PPV 0.82795699 0.6260722 0.9476694
## NPV 0.63636364 0.3963045 0.8180504
## DLR.Positive 1.36651235 1.0381348 1.7987606
## DLR.Negative 0.16225750 0.0520048 0.5062512
## FP 16.00000000 - -
## FN 4.00000000 - -
## Optimal criterion 0.03703704 - -
plot(optimal.cutpoint.Youden4)

## Press return for next page....

## Press return for next page....

## Press return for next page....

# Formula method
optimal.cutpoint.Youden5 <- optimal.cutpoints(X = elas ~ status, tag.healthy = 0,
methods = "Youden", data = elas, pop.prev = NULL, categorical.cov = "gender",
control = control.cutpoints(), ci.fit = FALSE, conf.level = 0.95, trace = FALSE)
summary(optimal.cutpoint.Youden5)
##
## Call:
## optimal.cutpoints.formula(X = elas ~ status, tag.healthy = 0,
## methods = "Youden", data = elas, categorical.cov = "gender",
## pop.prev = NULL, control = control.cutpoints(), ci.fit = FALSE,
## conf.level = 0.95, trace = FALSE)
##
## *************************************************
## Female
## *************************************************
##
## Area under the ROC curve (AUC): 0.818 (0.684, 0.952)
##
## CRITERION: Youden
## Number of optimal cutoffs: 1
##
## Estimate
## cutoff 46.0000000
## Se 0.6666667
## Sp 0.8181818
## PPV 0.7142857
## NPV 0.7826087
## DLR.Positive 3.6666667
## DLR.Negative 0.4074074
## FP 4.0000000
## FN 5.0000000
## Optimal criterion 0.4848485
##
##
## *************************************************
## Male
## *************************************************
##
## Area under the ROC curve (AUC): 0.722 (0.612, 0.831)
##
## CRITERION: Youden
## Number of optimal cutoffs: 1
##
## Estimate
## cutoff 38.0000000
## Se 0.6543210
## Sp 0.7391304
## PPV 0.8983051
## NPV 0.3777778
## DLR.Positive 2.5082305
## DLR.Negative 0.4676834
## FP 6.0000000
## FN 28.0000000
## Optimal criterion 0.3934514
plot(optimal.cutpoint.Youden5)

## Press return for next page....

## Press return for next page....

## Press return for next page....

# Sensitivity equal to Specificity Method ("SpEqualSe"): Covariate gender
optimal.cutpoint.SpEqualSe <- optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "SpEqualSe", data = elas, pop.prev = NULL, categorical.cov = "gender",
control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.SpEqualSe)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "SpEqualSe", data = elas, categorical.cov = "gender",
## pop.prev = NULL, control = control.cutpoints(), ci.fit = TRUE,
## conf.level = 0.95, trace = FALSE)
##
## *************************************************
## Female
## *************************************************
##
## Area under the ROC curve (AUC): 0.818 (0.684, 0.952)
##
## CRITERION: SpEqualSe
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 41.00000000 - -
## Se 0.73333333 0.4489968 0.9221285
## Sp 0.68181818 0.4512756 0.8613535
## PPV 0.61111111 0.3762084 0.8712446
## NPV 0.78947368 0.5263331 0.9157684
## DLR.Positive 2.30476190 1.1634481 4.5656764
## DLR.Negative 0.39111111 0.1611869 0.9490094
## FP 7.00000000 - -
## FN 4.00000000 - -
## Optimal criterion 0.05151515 - -
##
##
## *************************************************
## Male
## *************************************************
##
## Area under the ROC curve (AUC): 0.722 (0.612, 0.831)
##
## CRITERION: SpEqualSe
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 36.00000000 - -
## Se 0.66666667 0.5531734 0.7675667
## Sp 0.60869565 0.3854190 0.8029236
## PPV 0.85714286 0.7075091 0.9083152
## NPV 0.34146341 0.2429772 0.5759222
## DLR.Positive 1.70370370 1.0003372 2.9016279
## DLR.Negative 0.54761905 0.3492857 0.8585711
## FP 9.00000000 - -
## FN 27.00000000 - -
## Optimal criterion 0.05797101 - -
plot(optimal.cutpoint.SpEqualSe)

## Press return for next page....

## Press return for next page....

## Press return for next page....

# Sensitivity equal to Specificity Method ("SpEqualSe"): no covariate
optimal.cutpoint.SpEqualSe2 <- optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "SpEqualSe", data = elas, pop.prev = NULL,
control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.SpEqualSe2)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "SpEqualSe", data = elas, pop.prev = NULL, control = control.cutpoints(),
## ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
##
## Area under the ROC curve (AUC): 0.744 (0.659, 0.828)
##
## CRITERION: SpEqualSe
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 38.00000000 - -
## Se 0.67708333 0.5739422 0.7689594
## Sp 0.66666667 0.5104964 0.7999943
## PPV 0.81250000 0.6932126 0.8730702
## NPV 0.49180328 0.3833777 0.6593327
## DLR.Positive 2.03125000 1.3138647 3.1403359
## DLR.Negative 0.48437500 0.3393631 0.6913514
## FP 15.00000000 - -
## FN 31.00000000 - -
## Optimal criterion 0.01041667 - -
plot(optimal.cutpoint.SpEqualSe2)

## Press return for next page....

# Maximizes Specificity Method ("MaxSp"): Covariate gender
optimal.cutpoint.MaxSp <- optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "MaxSp", data = elas, pop.prev = NULL, categorical.cov = "gender",
control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.MaxSp)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "MaxSp", data = elas, categorical.cov = "gender",
## pop.prev = NULL, control = control.cutpoints(), ci.fit = TRUE,
## conf.level = 0.95, trace = FALSE)
##
## *************************************************
## Female
## *************************************************
##
## Area under the ROC curve (AUC): 0.818 (0.684, 0.952)
##
## CRITERION: MaxSp
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 60.0000000 - -
## Se 0.4000000 0.1633643 0.6771302
## Sp 1.0000000 0.8456275 NaN
## PPV 1.0000000 0.5990306 1.0000000
## NPV 0.7096774 0.4172378 NaN
## DLR.Positive Inf NaN Inf
## DLR.Negative 0.6000000 0.3969193 0.9069854
## FP 0.0000000 - -
## FN 9.0000000 - -
##
##
## *************************************************
## Male
## *************************************************
##
## Area under the ROC curve (AUC): 0.722 (0.612, 0.831)
##
## CRITERION: MaxSp
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 57.0000000 - -
## Se 0.2839506 0.1892620 0.3950134
## Sp 1.0000000 0.8518149 NaN
## PPV 1.0000000 0.8518149 1.0000000
## NPV 0.2839506 0.1892620 NaN
## DLR.Positive Inf NaN Inf
## DLR.Negative 0.7160494 0.6242880 0.8212983
## FP 0.0000000 - -
## FN 58.0000000 - -
plot(optimal.cutpoint.MaxSp)

## Press return for next page....

## Press return for next page....

## Press return for next page....

# Maximizes Specificity Method ("MaxSp"): no covariate
optimal.cutpoint.MaxSp2 <- optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "MaxSp", data = elas, pop.prev = NULL,
control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.MaxSp2)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "MaxSp", data = elas, pop.prev = NULL, control = control.cutpoints(),
## ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
##
## Area under the ROC curve (AUC): 0.744 (0.659, 0.828)
##
## CRITERION: MaxSp
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 57.0000000 - -
## Se 0.3020833 0.2125183 0.4042532
## Sp 1.0000000 0.9212949 NaN
## PPV 1.0000000 0.8829539 1.0000000
## NPV 0.4017857 0.2951617 NaN
## DLR.Positive Inf NaN Inf
## DLR.Negative 0.6979167 0.6118543 0.7960844
## FP 0.0000000 - -
## FN 67.0000000 - -
plot(optimal.cutpoint.MaxSp2)

## Press return for next page....

# Maximizes sensitivity Method ("MaxSe"): Covariate gender
optimal.cutpoint.MaxSe <- optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "MaxSe", data = elas, pop.prev = NULL, categorical.cov = "gender",
control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.MaxSe)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "MaxSe", data = elas, categorical.cov = "gender",
## pop.prev = NULL, control = control.cutpoints(), ci.fit = TRUE,
## conf.level = 0.95, trace = FALSE)
##
## *************************************************
## Female
## *************************************************
##
## Area under the ROC curve (AUC): 0.818 (0.684, 0.952)
##
## CRITERION: MaxSe
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 25.0000000 - -
## Se 1.0000000 0.7819806 NaN
## Sp 0.4545455 0.2438619 0.6778952
## PPV 0.5555556 0.3260386 NaN
## NPV 1.0000000 0.7051162 1.0000000
## DLR.Positive 1.8333333 1.2519199 2.6847652
## DLR.Negative 0.0000000 0.0000000 NaN
## FP 12.0000000 - -
## FN 0.0000000 - -
##
##
## *************************************************
## Male
## *************************************************
##
## Area under the ROC curve (AUC): 0.722 (0.612, 0.831)
##
## CRITERION: MaxSe
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 13.00000000 - -
## Se 1.00000000 0.95547974 NaN
## Sp 0.08695652 0.01070997 0.2803793
## PPV 0.79411765 0.30480697 NaN
## NPV 1.00000000 0.34637023 1.0000000
## DLR.Positive 1.09523810 0.96546074 1.2424601
## DLR.Negative 0.00000000 0.00000000 NaN
## FP 21.00000000 - -
## FN 0.00000000 - -
plot(optimal.cutpoint.MaxSe)

## Press return for next page....

## Press return for next page....

## Press return for next page....

# Maximizes sensitivity Method ("MaxSe"): no covariate
optimal.cutpoint.MaxSe2 <- optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "MaxSe", data = elas, pop.prev = NULL,
control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.MaxSe2)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "MaxSe", data = elas, pop.prev = NULL, control = control.cutpoints(),
## ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
##
## Area under the ROC curve (AUC): 0.744 (0.659, 0.828)
##
## CRITERION: MaxSe
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 13.0000000 - -
## Se 1.0000000 0.96230308 NaN
## Sp 0.1555556 0.06490921 0.2945516
## PPV 0.7164179 0.48769848 NaN
## NPV 1.0000000 0.65051710 1.0000000
## DLR.Positive 1.1842105 1.04464372 1.3424238
## DLR.Negative 0.0000000 0.00000000 NaN
## FP 38.0000000 - -
## FN 0.0000000 - -
plot(optimal.cutpoint.MaxSe2)

## Press return for next page....

#maximizes Sensitivity and Specificity simultaneously ("MaxSpSe"):covariate gender
optimal.cutpoint.MaxSpSe <- optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "MaxSpSe", data = elas, pop.prev = NULL, categorical.cov = "gender",
control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.MaxSpSe)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "MaxSpSe", data = elas, categorical.cov = "gender",
## pop.prev = NULL, control = control.cutpoints(), ci.fit = TRUE,
## conf.level = 0.95, trace = FALSE)
##
## *************************************************
## Female
## *************************************************
##
## Area under the ROC curve (AUC): 0.818 (0.684, 0.952)
##
## CRITERION: MaxSpSe
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 41.0000000 - -
## Se 0.7333333 0.4489968 0.9221285
## Sp 0.6818182 0.4512756 0.8613535
## PPV 0.6111111 0.3762084 0.8712446
## NPV 0.7894737 0.5263331 0.9157684
## DLR.Positive 2.3047619 1.1634481 4.5656764
## DLR.Negative 0.3911111 0.1611869 0.9490094
## FP 7.0000000 - -
## FN 4.0000000 - -
## Optimal criterion 0.6818182 - -
##
##
## *************************************************
## Male
## *************************************************
##
## Area under the ROC curve (AUC): 0.722 (0.612, 0.831)
##
## CRITERION: MaxSpSe
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 38.0000000 - -
## Se 0.6543210 0.5404147 0.7565737
## Sp 0.7391304 0.5159480 0.8977139
## PPV 0.8983051 0.7686835 0.9355009
## NPV 0.3777778 0.2738718 0.6528595
## DLR.Positive 2.5082305 1.2382379 5.0807845
## DLR.Negative 0.4676834 0.3180320 0.6877538
## FP 6.0000000 - -
## FN 28.0000000 - -
## Optimal criterion 0.6543210 - -
plot(optimal.cutpoint.MaxSpSe)

## Press return for next page....

## Press return for next page....

## Press return for next page....

# Maximizes sensitivity and specificity simultaneously ("MaxSpSe"): no covariate
optimal.cutpoint.MaxSpSe2 <- optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "MaxSpSe", data = elas, pop.prev = NULL,
control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.MaxSpSe2)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "MaxSpSe", data = elas, pop.prev = NULL, control = control.cutpoints(),
## ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
##
## Area under the ROC curve (AUC): 0.744 (0.659, 0.828)
##
## CRITERION: MaxSpSe
## Number of optimal cutoffs: 2
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 37.0000000 - -
## Se 0.6875000 0.5848184 0.7782474
## Sp 0.6666667 0.5104964 0.7999943
## PPV 0.8148148 0.6964499 0.8752971
## NPV 0.5000000 0.3903427 0.6666588
## DLR.Positive 2.0625000 1.3354513 3.1853698
## DLR.Negative 0.4687500 0.3265302 0.6729134
## FP 15.0000000 - -
## FN 30.0000000 - -
## Optimal criterion 0.6666667 - -
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 38.0000000 - -
## Se 0.6770833 0.5739422 0.7689594
## Sp 0.6666667 0.5104964 0.7999943
## PPV 0.8125000 0.6932126 0.8730702
## NPV 0.4918033 0.3833777 0.6593327
## DLR.Positive 2.0312500 1.3138647 3.1403359
## DLR.Negative 0.4843750 0.3393631 0.6913514
## FP 15.0000000 - -
## FN 31.0000000 - -
## Optimal criterion 0.6666667 - -
plot(optimal.cutpoint.MaxSpSe2)

## Press return for next page....

#Maximizes the product of Sensitivity and Specificity/ Accuracy Area"MaxProdSpSe"):covariate gender
optimal.cutpoint.MaxProdSpSe <- optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "MaxProdSpSe", data = elas, pop.prev = NULL, categorical.cov = "gender",
control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.MaxProdSpSe)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "MaxProdSpSe", data = elas, categorical.cov = "gender",
## pop.prev = NULL, control = control.cutpoints(), ci.fit = TRUE,
## conf.level = 0.95, trace = FALSE)
##
## *************************************************
## Female
## *************************************************
##
## Area under the ROC curve (AUC): 0.818 (0.684, 0.952)
##
## CRITERION: MaxProdSpSe
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 46.0000000 - -
## Se 0.6666667 0.3838037 0.8817589
## Sp 0.8181818 0.5971542 0.9481327
## PPV 0.7142857 0.4516107 0.9031160
## NPV 0.7826087 0.5285570 0.9359958
## DLR.Positive 3.6666667 1.4096667 9.5373214
## DLR.Negative 0.4074074 0.1939348 0.8558589
## FP 4.0000000 - -
## FN 5.0000000 - -
## Optimal criterion 0.5454545 - -
##
##
## *************************************************
## Male
## *************************************************
##
## Area under the ROC curve (AUC): 0.722 (0.612, 0.831)
##
## CRITERION: MaxProdSpSe
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 38.0000000 - -
## Se 0.6543210 0.5404147 0.7565737
## Sp 0.7391304 0.5159480 0.8977139
## PPV 0.8983051 0.7686835 0.9355009
## NPV 0.3777778 0.2738718 0.6528595
## DLR.Positive 2.5082305 1.2382379 5.0807845
## DLR.Negative 0.4676834 0.3180320 0.6877538
## FP 6.0000000 - -
## FN 28.0000000 - -
## Optimal criterion 0.4836286 - -
plot(optimal.cutpoint.MaxProdSpSe)

## Press return for next page....

## Press return for next page....

## Press return for next page....

# Maximizes product of sensitivity and specificity/Accuracy area("MaxProdSpSe"): no covariate
optimal.cutpoint.MaxProdSpSe2 <- optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "MaxProdSpSe", data = elas, pop.prev = NULL,
control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.MaxProdSpSe2)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "MaxProdSpSe", data = elas, pop.prev = NULL, control = control.cutpoints(),
## ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
##
## Area under the ROC curve (AUC): 0.744 (0.659, 0.828)
##
## CRITERION: MaxProdSpSe
## Number of optimal cutoffs: 1
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 37.0000000 - -
## Se 0.6875000 0.5848184 0.7782474
## Sp 0.6666667 0.5104964 0.7999943
## PPV 0.8148148 0.6964499 0.8752971
## NPV 0.5000000 0.3903427 0.6666588
## DLR.Positive 2.0625000 1.3354513 3.1853698
## DLR.Negative 0.4687500 0.3265302 0.6729134
## FP 15.0000000 - -
## FN 30.0000000 - -
## Optimal criterion 0.4583333 - -
plot(optimal.cutpoint.MaxProdSpSe2)

## Press return for next page....

#Minimize error rate/Maximize efficiency ("MaxEfficiency"):covariate gender
optimal.cutpoint.MaxEfficiency <- optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "MaxEfficiency", data = elas, pop.prev = NULL, categorical.cov = "gender",
control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.MaxEfficiency)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "MaxEfficiency", data = elas, categorical.cov = "gender",
## pop.prev = NULL, control = control.cutpoints(), ci.fit = TRUE,
## conf.level = 0.95, trace = FALSE)
##
## *************************************************
## Female
## *************************************************
##
## Area under the ROC curve (AUC): 0.818 (0.684, 0.952)
##
## CRITERION: MaxEfficiency
## Number of optimal cutoffs: 2
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 46.0000000 - -
## Se 0.6666667 0.3838037 0.8817589
## Sp 0.8181818 0.5971542 0.9481327
## PPV 0.7142857 0.4516107 0.9031160
## NPV 0.7826087 0.5285570 0.9359958
## DLR.Positive 3.6666667 1.4096667 9.5373214
## DLR.Negative 0.4074074 0.1939348 0.8558589
## FP 4.0000000 - -
## FN 5.0000000 - -
## Optimal criterion 0.7567568 - -
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 60.0000000 - -
## Se 0.4000000 0.1633643 0.6771302
## Sp 1.0000000 0.8456275 NaN
## PPV 1.0000000 0.5990306 1.0000000
## NPV 0.7096774 0.4172378 NaN
## DLR.Positive Inf NaN Inf
## DLR.Negative 0.6000000 0.3969193 0.9069854
## FP 0.0000000 - -
## FN 9.0000000 - -
## Optimal criterion 0.7567568 - -
##
##
## *************************************************
## Male
## *************************************************
##
## Area under the ROC curve (AUC): 0.722 (0.612, 0.831)
##
## CRITERION: MaxEfficiency
## Number of optimal cutoffs: 2
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 21.0000000 - -
## Se 0.9629630 0.89555629 0.9922960
## Sp 0.2608696 0.10228613 0.4840520
## PPV 0.8210526 0.59697391 0.9578589
## NPV 0.6666667 0.39743777 0.8416808
## DLR.Positive 1.3028322 1.01818356 1.6670588
## DLR.Negative 0.1419753 0.03845178 0.5242147
## FP 17.0000000 - -
## FN 3.0000000 - -
## Optimal criterion 0.8076923 - -
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 22.0000000 - -
## Se 0.9506173 0.8783619 0.9863829
## Sp 0.3043478 0.1321029 0.5291917
## PPV 0.8279570 0.6260722 0.9476694
## NPV 0.6363636 0.3963045 0.8180504
## DLR.Positive 1.3665123 1.0381348 1.7987606
## DLR.Negative 0.1622575 0.0520048 0.5062512
## FP 16.0000000 - -
## FN 4.0000000 - -
## Optimal criterion 0.8076923 - -
plot(optimal.cutpoint.MaxEfficiency)

## Press return for next page....

## Press return for next page....

## Press return for next page....

#Minimize error rate/Maximize efficiency ("MaxEfficiency") : no covariate
optimal.cutpoint.MaxEfficiency2 <- optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "MaxEfficiency", data = elas, pop.prev = NULL,
control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
## Warning: Sensitivity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Specificity CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Positive Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
## Warning: Negative Predictive Value CI: "Exact" method may not be valid for some values (see Help Manual).
summary(optimal.cutpoint.MaxEfficiency2)
##
## Call:
## optimal.cutpoints.default(X = "elas", status = "status", tag.healthy = 0,
## methods = "MaxEfficiency", data = elas, pop.prev = NULL,
## control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95,
## trace = FALSE)
##
## Area under the ROC curve (AUC): 0.744 (0.659, 0.828)
##
## CRITERION: MaxEfficiency
## Number of optimal cutoffs: 2
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 21.00000000 - -
## Se 0.96875000 0.91138190 0.9935085
## Sp 0.35555556 0.21868401 0.5121990
## PPV 0.76229508 0.61931904 0.9405915
## NPV 0.84210526 0.63890510 0.9103152
## DLR.Positive 1.50323276 1.20640227 1.8730972
## DLR.Negative 0.08789062 0.02697495 0.2863679
## FP 29.00000000 - -
## FN 3.00000000 - -
## Optimal criterion 0.77304965 - -
##
## Estimate 95% CI lower limit 95% CI upper limit
## cutoff 22.0000000 - -
## Se 0.9583333 0.89674256 0.9885323
## Sp 0.3777778 0.23767824 0.5345899
## PPV 0.7666667 0.62787806 0.9248939
## NPV 0.8095238 0.61608606 0.8893866
## DLR.Positive 1.5401786 1.22195079 1.9412811
## DLR.Negative 0.1102941 0.03937478 0.3089489
## FP 28.0000000 - -
## FN 4.0000000 - -
## Optimal criterion 0.7730496 - -
plot(optimal.cutpoint.MaxEfficiency2)

## Press return for next page....
