| Title: | Statistical Combination of Diagnostic Tests |
| Description: | A system for combining two diagnostic tests using various approaches that include statistical and machine-learning-based methodologies. These approaches are divided into four groups: linear combination methods, non-linear combination methods, mathematical operators, and machine learning algorithms. See the https://biotools.erciyes.edu.tr/dtComb/ website for more information, documentation, and examples. |
| Version: | 1.0.8 |
| URL: | https://github.com/gokmenzararsiz/dtComb |
| Language: | en-US |
| Depends: | R (≥ 3.5.0) |
| Imports: | pROC (≥ 1.18.0), caret, epiR, gam, ggplot2, ggpubr, glmnet, OptimalCutpoints |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| LazyData: | true |
| RoxygenNote: | 7.3.3 |
| NeedsCompilation: | no |
| Packaged: | 2026-06-24 14:44:24 UTC; serrailaydayerlitas |
| Suggests: | knitr, rmarkdown, testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| VignetteBuilder: | knitr |
| Author: | Serra Ilayda Yerlitas Tastan [aut, ctb], Serra Bersan Gengec [aut, ctb], Necla Kochan [aut, ctb], Gozde Erturk Zararsiz [aut, ctb], Selcuk Korkmaz [aut, ctb], Gokmen Zararsiz [aut, ctb, cre] |
| Maintainer: | Gokmen Zararsiz <gokmen.zararsiz@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-06-24 15:10:08 UTC |
dtComb: A Comprehensive R Package for Combining Diagnostic Tests
Description
The dtComb package provides tools to calculate combination scores of two biomarkers, categorized into four main types:
-
linComb: Linear combinations, -
nonlinComb: Non-linear combinations, -
mathComb: Mathematical operator-based combinations, -
mlComb: Machine learning–based combinations.
Author(s)
Maintainer: Gokmen Zararsiz gokmen.zararsiz@gmail.com [contributor]
Authors:
Serra Ilayda Yerlitas Tastan ilaydayerlitas340@gmail.com [contributor]
Serra Bersan Gengec serrabersan@gmail.com [contributor]
Necla Kochan necla.kayaalp@gmail.com [contributor]
Gozde Erturk Zararsiz gozdeerturk9@gmail.com [contributor]
Selcuk Korkmaz selcukorkmaz@gmail.com [contributor]
See Also
Useful links:
Machine learning model table for mlComb() Includes machine learning models used for the mlComb function
Description
Machine learning model table for mlComb() Includes machine learning models used for the mlComb function
Usage
data(allMethods)
Format
A data frame with 113 rows and 2 variables:
- Method
Valid name for the function
- Model
Model name
Examples
data(allMethods)
allMethods
Available classification/regression methods in dtComb
Description
This function returns a data.frame of available classification
methods in dtComb. These methods are imported from the caret package.
Usage
availableMethods()
Value
No return value contains the method names and explanations of the
machine-learning models available for the dtComb package.
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Examples
availableMethods()
Biomarker data from carriers of a rare genetic disorder A data set containing the carriers of a rare genetic disorder for 120 samples.
Description
Biomarker data from carriers of a rare genetic disorder A data set containing the carriers of a rare genetic disorder for 120 samples.
Usage
data(exampleData2)
Format
A data frame with 120 rows and 5 variables:
- Group
Indicator whether the person is a carrier; values:
"carriers"and"normals".- m1
Biomarker 1, 1. measurement blood sample
- m2
Biomarker 2, 2. measurement blood sample
- m3
Biomarker 3, 3. measurement blood sample
- m4
Biomarker 4, 4. measurement blood sample
Examples
data(exampleData2)
exampleData2$Group <- factor(exampleData2$Group)
gcol <- c("#E69F00", "#56B4E9")
plot(exampleData2$m1, exampleData2$m2,
col = gcol[as.numeric(exampleData2$Group)]
)
Simulated data with healthy and diseased individuals A simulation data containing 250 diseased and 250 healthy individuals.
Description
Simulated data with healthy and diseased individuals A simulation data containing 250 diseased and 250 healthy individuals.
Usage
data(exampleData3)
Format
A data frame with 500 rows and 3 variables:
- status
Indicator of one's condition, values healthy and diseased
- marker1
1. biomarker
- marker2
2. biomarker
Examples
data(exampleData3)
exampleData3$status <- factor(exampleData3$status)
gcol <- c("#E69F00", "#56B4E9")
plot(exampleData3$marker1, exampleData3$marker2,
col = gcol[as.numeric(exampleData3$status)]
)
Helper function for PCL method.
Description
The helper_PCL function estimates the optimized value of
given biomarkers for the PCL method.
Usage
helper_PCL(lambda, neg.set, pos.set)
Arguments
lambda |
a |
neg.set |
a |
pos.set |
a |
Value
A numeric value for the estimated optimized value
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Examples
# call data
data(laparotomy)
# define the function parameters
markers <- cbind(laparotomy$ddimer, laparotomy$log_leukocyte)
status <- factor(laparotomy$group, levels = c("not_needed", "needed"))
neg.set <- markers[status == levels(status)[1], ]
pos.set <- markers[status == levels(status)[2], ]
lambda <- 0.5
stat <- helper_PCL(lambda, neg.set = neg.set, pos.set = pos.set)
Helper function for PT method.
Description
The helper_PT function estimates the optimized value of
given biomarkers for the PT method.
Usage
helper_PT(lambda, neg.set, pos.set)
Arguments
lambda |
a |
neg.set |
a |
pos.set |
a |
Value
A numeric value for the estimated optimized value
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Examples
# call data
data(laparotomy)
# define the function parameters
markers <- cbind(laparotomy$ddimer, laparotomy$log_leukocyte)
status <- factor(laparotomy$group, levels = c("not_needed", "needed"))
neg.set <- markers[status == levels(status)[1], ]
pos.set <- markers[status == levels(status)[2], ]
lambda <- 0.5
stat <- helper_PT(lambda, neg.set = neg.set, pos.set = pos.set)
Helper function for TS method.
Description
The helper_TS function calculates the combination
coefficient and optimized value of given biomarkers for the TS method.
Usage
helper_TS(theta, markers, status)
Arguments
theta |
a |
markers |
a |
status |
a |
Value
A numeric Optimized value calculated with combination scores
using theta
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Examples
# call data
data(laparotomy)
# define the function parameters
markers <- cbind(laparotomy$ddimer, laparotomy$log_leukocyte)
status <- factor(laparotomy$group, levels = c("not_needed", "needed"))
t <- 0.5
stat <- helper_TS(theta = t, markers = markers, status = status)
Helper function for minimax method.
Description
The helper_minimax function calculates the combination
coefficient and optimized value of given biomarkers for the minimax method.
Usage
helper_minimax(t, neg.set, pos.set, markers, status)
Arguments
t |
a |
neg.set |
a |
pos.set |
a |
markers |
a |
status |
a |
Value
A numeric Optimized value calculated with combination scores
using t
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Examples
# call data
data(laparotomy)
# define the function parameters
markers <- cbind(laparotomy$ddimer, laparotomy$log_leukocyte)
status <- factor(laparotomy$group, levels = c("not_needed", "needed"))
neg.set <- markers[status == levels(status)[1], ]
pos.set <- markers[status == levels(status)[2], ]
t <- 0.5
stat <- helper_minimax(t,
neg.set = neg.set, pos.set = pos.set,
markers = markers, status
)
Helper function for minmax method.
Description
The helper_minmax function estimates optimized value of
given biomarkers for the minmax method.
Usage
helper_minmax(lambda, neg.set, pos.set)
Arguments
lambda |
a |
neg.set |
a |
pos.set |
a |
Value
A numeric value for the estimated optimized value
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Examples
# call data
data(laparotomy)
# define the function parameters
markers <- cbind(laparotomy$ddimer, laparotomy$log_leukocyte)
status <- factor(laparotomy$group, levels = c("not_needed", "needed"))
neg.set <- markers[status == levels(status)[1], ]
pos.set <- markers[status == levels(status)[2], ]
lambda <- 0.5
stat <- helper_minmax(lambda, neg.set = neg.set, pos.set = pos.set)
Calculate Cohen's kappa and accuracy.
Description
The kappa.accuracy calculates Cohen's kappa and accuracy.
Usage
## S3 method for class 'accuracy'
kappa(DiagStatCombined)
Arguments
DiagStatCombined |
a |
Value
A list of Cohen's kappa and accuracy values
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Diagnostic laparotomy dataset A data set containing the results of diagnostic laparotomy procedures for 225 patients.
Description
Examples data for the dtComb package
Usage
data(laparotomy)
Format
A data frame with 225 rows and 3 variables:
- group
Indicator whether the procedure was needed; values:
"needed"or"not_needed".- ddimer
Biomarker 1, D-Dimer protein level in blood, ng/mL
- log_leukocyte
Biomarker 2, Logarithm of Leukocyte count in blood, per mcL
Examples
data(laparotomy)
laparotomy$group <- factor(laparotomy$group)
gcol <- c("#E69F00", "#56B4E9")
plot(laparotomy$ddimer, laparotomy$log_leukocyte,
col = gcol[as.numeric(laparotomy$group)]
)
Linear Combination Methods for Diagnostic Test Scores
Description
The linComb function calculates the combination
scores of two diagnostic tests selected among several linear combination
methods and standardization options.
Usage
linComb(
markers = NULL,
status = NULL,
event = NULL,
method = c("scoring", "SL", "logistic", "minmax", "PT", "PCL", "minimax", "TS"),
resample = c("none", "cv", "repeatedcv", "boot"),
nfolds = 5,
nrepeats = 3,
niters = 10,
standardize = c("none", "min_max_scale", "zScore", "tScore", "scale_mean_to_one",
"scale_sd_to_one"),
ndigits = 0,
show.plot = TRUE,
direction = c("<", ">"),
conf.level = 0.95,
cutoff.method = c("CB", "MCT", "MinValueSp", "MinValueSe", "ValueSp", "ValueSe",
"MinValueSpSe", "MaxSp", "MaxSe", "MaxSpSe", "MaxProdSpSe", "ROC01", "SpEqualSe",
"Youden", "MaxEfficiency", "Minimax", "MaxDOR", "MaxKappa", "MinValueNPV",
"MinValuePPV", "ValueNPV", "ValuePPV", "MinValueNPVPPV", "PROC01", "NPVEqualPPV",
"MaxNPVPPV", "MaxSumNPVPPV", "MaxProdNPVPPV", "ValueDLR.Negative",
"ValueDLR.Positive", "MinPvalue", "ObservedPrev", "MeanPrev", "PrevalenceMatching"),
show.result = FALSE,
...
)
Arguments
markers |
a |
status |
a |
event |
a |
method |
a The available methods are:
|
resample |
a
|
nfolds |
a |
nrepeats |
a |
niters |
a |
standardize |
a
|
ndigits |
a |
show.plot |
a |
direction |
a |
conf.level |
a |
cutoff.method |
a |
show.result |
a |
... |
further arguments. Currently has no effect on the results. |
Value
A list of numeric linear combination scores calculated
according to the given method and standardization option.
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Examples
# call data
data(laparotomy)
# define the function parameters
markers <- laparotomy[, -1]
status <- factor(laparotomy$group, levels = c("not_needed", "needed"))
event <- "needed"
score1 <- linComb(
markers = markers, status = status, event = event,
method = "logistic", resample = "none", show.plot = TRUE,
standardize = "none", direction = "<", cutoff.method = "Youden"
)
# call data
data(exampleData2)
# define the function parameters
markers <- exampleData2[, -c(1:3, 6:7)]
status <- factor(exampleData2$Group, levels = c("normals", "carriers"))
event <- "carriers"
score2 <- linComb(
markers = markers, status = status, event = event,
method = "PT", resample = "none", standardize = "none", direction = "<",
cutoff.method = "Youden", show.result = TRUE
)
score3 <- linComb(
markers = markers, status = status, event = event,
method = "minmax", resample = "none", direction = "<",
cutoff.method = "Youden"
)
Combine two diagnostic tests with several mathematical operators and distance measures.
Description
The mathComb function returns the combination results of
two diagnostic tests with different mathematical operators, distance
measures, standardization, and transform options.
Usage
mathComb(
markers = NULL,
status = NULL,
event = NULL,
method = c("add", "multiply", "divide", "subtract", "distance", "baseinexp",
"expinbase"),
distance = c("euclidean", "manhattan", "chebyshev", "kulczynski_d", "lorentzian",
"avg", "taneja", "kumar-johnson"),
standardize = c("none", "min_max_scale", "zScore", "tScore", "scale_mean_to_one",
"scale_sd_to_one"),
transform = c("none", "log", "exp", "sin", "cos"),
show.plot = TRUE,
direction = c("<", ">"),
conf.level = 0.95,
cutoff.method = c("CB", "MCT", "MinValueSp", "MinValueSe", "ValueSp", "ValueSe",
"MinValueSpSe", "MaxSp", "MaxSe", "MaxSpSe", "MaxProdSpSe", "ROC01", "SpEqualSe",
"Youden", "MaxEfficiency", "Minimax", "MaxDOR", "MaxKappa", "MinValueNPV",
"MinValuePPV", "ValueNPV", "ValuePPV", "MinValueNPVPPV", "PROC01", "NPVEqualPPV",
"MaxNPVPPV", "MaxSumNPVPPV", "MaxProdNPVPPV", "ValueDLR.Negative",
"ValueDLR.Positive", "MinPvalue", "ObservedPrev", "MeanPrev", "PrevalenceMatching"),
show.result = FALSE,
...
)
Arguments
markers |
a |
status |
a |
event |
a |
method |
a
|
distance |
a
|
standardize |
a
|
transform |
A
|
show.plot |
a |
direction |
a |
conf.level |
a |
cutoff.method |
a |
show.result |
A |
... |
further arguments. Currently has no effect on the results. |
Value
A list containing the computed combination scores and, optionally, diagnostic performance metrics.
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Examples
data(laparotomy)
markers <- laparotomy[, -1]
status <- factor(laparotomy$group, levels = c("not_needed", "needed"))
event <- "needed"
direction <- "<"
cutoff.method <- "Youden"
score1 <- mathComb(
markers = markers, status = status, event = event,
method = "distance", distance = "avg", direction = direction, show.plot = FALSE,
standardize = "none", cutoff.method = cutoff.method
)
score2 <- mathComb(
markers = markers, status = status, event = event,
method = "baseinexp", transform = "exp", direction = direction,
cutoff.method = cutoff.method
)
score3 <- mathComb(
markers = markers, status = status, event = event,
method = "subtract", direction = "<", cutoff.method = "MinValueSp", transform = "sin"
)
Combine two diagnostic tests with Machine Learning Algorithms.
Description
The mlComb function calculates the combination
scores of two diagnostic tests selected among several Machine Learning
Algorithms
Usage
mlComb(
markers = NULL,
status = NULL,
event = NULL,
method = NULL,
resample = NULL,
niters = 10,
nfolds = 5,
nrepeats = 3,
preProcess = NULL,
show.plot = TRUE,
B = 25,
direction = c("<", ">"),
conf.level = 0.95,
p = 0.75,
cutoff.method = c("CB", "MCT", "MinValueSp", "MinValueSe", "ValueSp", "ValueSe",
"MinValueSpSe", "MaxSp", "MaxSe", "MaxSpSe", "MaxProdSpSe", "ROC01", "SpEqualSe",
"Youden", "MaxEfficiency", "Minimax", "MaxDOR", "MaxKappa", "MinValueNPV",
"MinValuePPV", "ValueNPV", "ValuePPV", "MinValueNPVPPV", "PROC01", "NPVEqualPPV",
"MaxNPVPPV", "MaxSumNPVPPV", "MaxProdNPVPPV", "ValueDLR.Negative",
"ValueDLR.Positive", "MinPvalue", "ObservedPrev", "MeanPrev", "PrevalenceMatching"),
show.result = FALSE,
...
)
Arguments
markers |
a |
status |
a |
event |
a |
method |
a IMPORTANT: See https://topepo.github.io/caret/available-models.html for further information about the methods used in this function. |
resample |
A character string specifying the resampling method used while
training the model. Available methods are |
niters |
A positive integer indicating the number of bootstrap
resampling iterations. Used for |
nfolds |
A positive integer. For |
nrepeats |
A positive integer indicating the number of repeats for
|
preProcess |
a |
show.plot |
a |
B |
a |
direction |
a |
conf.level |
a |
p |
A numeric value between 0 and 1 specifying the training proportion
used for |
cutoff.method |
a |
show.result |
a |
... |
optional arguments passed to selected classifiers. |
Value
A list of AUC values, diagnostic statistics,
coordinates of the ROC curve for the combination score obtained using
Machine Learning Algorithms as well as the given biomarkers individually, a
comparison table for the AUC values of individual biomarkers and combination
score obtained and the fitted model.
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
See Also
availableMethods, caret::train,
caret::trainControl
Examples
# call data
data(laparotomy)
# define the function parameters
markers <- laparotomy[, -1]
status <- factor(laparotomy$group, levels = c("not_needed", "needed"))
event <- "needed"
model <- mlComb(
markers = markers, status = status, event = event,
method = "knn", resample = "cv", nfolds = 5,
preProcess = c("center", "scale"), direction = "<", cutoff.method = "Youden"
)
Combine two diagnostic tests with several non-linear combination methods.
Description
The nonlinComb function calculates the combination
scores of two diagnostic tests selected among several non-linear combination
methods and standardization options
Usage
nonlinComb(
markers = NULL,
status = NULL,
event = NULL,
method = c("polyreg", "ridgereg", "lassoreg", "elasticreg", "splines", "sgam", "nsgam"),
degree1 = 3,
degree2 = 3,
df1 = 4,
df2 = 4,
resample = c("none", "cv", "repeatedcv", "boot"),
nfolds = 5,
nrepeats = 3,
niters = 10,
standardize = c("none", "min_max_scale", "zScore", "tScore", "scale_mean_to_one",
"scale_sd_to_one"),
include.interact = FALSE,
alpha = 0.5,
show.plot = TRUE,
direction = c("<", ">"),
conf.level = 0.95,
cutoff.method = c("CB", "MCT", "MinValueSp", "MinValueSe", "ValueSp", "ValueSe",
"MinValueSpSe", "MaxSp", "MaxSe", "MaxSpSe", "MaxProdSpSe", "ROC01", "SpEqualSe",
"Youden", "MaxEfficiency", "Minimax", "MaxDOR", "MaxKappa", "MinValueNPV",
"MinValuePPV", "ValueNPV", "ValuePPV", "MinValueNPVPPV", "PROC01", "NPVEqualPPV",
"MaxNPVPPV", "MaxSumNPVPPV", "MaxProdNPVPPV", "ValueDLR.Negative",
"ValueDLR.Positive", "MinPvalue", "ObservedPrev", "MeanPrev", "PrevalenceMatching"),
show.result = FALSE,
...
)
Arguments
markers |
a |
status |
a |
event |
a |
method |
a
|
degree1 |
a |
degree2 |
a |
df1 |
a |
df2 |
a |
resample |
a
|
nfolds |
a |
nrepeats |
a |
niters |
a |
standardize |
a
|
include.interact |
a |
alpha |
a |
show.plot |
a |
direction |
a |
conf.level |
a |
cutoff.method |
a |
show.result |
a |
... |
further arguments. Currently has no effect on the results. |
Value
A list of numeric nonlinear combination scores calculated
according to the given method and standardization option
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Examples
data("laparotomy")
data <- laparotomy
markers <- data[, -1]
status <- factor(data$group, levels = c("not_needed", "needed"))
event <- "needed"
cutoff.method <- "Youden"
score1 <- nonlinComb(
markers = markers, status = status, event = event,
method = "lassoreg", include.interact = FALSE, resample = "boot", niters = 5,
degree1 = 4, degree2 = 4, cutoff.method = cutoff.method,
direction = "<"
)
score2 <- nonlinComb(
markers = markers, status = status, event = event,
method = "splines", resample = "none", cutoff.method = cutoff.method,
standardize = "tScore", direction = "<"
)
score3 <- nonlinComb(
markers = markers, status = status, event = event,
method = "lassoreg", resample = "repeatedcv", include.interact = TRUE,
cutoff.method = "ROC01", standardize = "zScore", direction = "<"
)
Plot the combination scores using the training model
Description
The plotComb a function that generates plots from the
training model. The function takes argument model. The outputs of the
function are three different plots generated from the combination scores.
Usage
plotComb(model, status)
Arguments
model |
a |
status |
a |
Value
A data.frame plots
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Examples
# call data
data(laparotomy)
# define the function parameters
markers <- laparotomy[, -1]
status <- factor(laparotomy$group, levels = c("not_needed", "needed"))
event <- "needed"
score1 <- linComb(
markers = markers, status = status, event = event,
method = "scoring", resample = "none",
standardize = "none", direction = "<", cutoff.method = "Youden"
)
plotComb(score1, status)
score2 <- nonlinComb(
markers = markers, status = status, event = event,
method = "nsgam", resample = "cv", include.interact = FALSE, direction = "<",
standardize = "zScore", cutoff.method = "Youden"
)
plot.score2 <- plotComb(score2, status)
score3 <- mathComb(
markers = markers, status = status, event = event,
method = "distance", distance = "euclidean", direction = "<",
standardize = "tScore", cutoff.method = "Youden"
)
plot.score3 <- plotComb(score3, status)
Predict combination scores and labels for new data sets using the training model
Description
The predict.dtComb is a function that generates predictions
for a new dataset of biomarkers using the parameters from the fitted model.
The function takes arguments newdata and model. The function's output is the
combination scores and labels of object type.
Usage
## S3 method for class 'dtComb'
predict(object, newdata = NULL, ...)
Arguments
object |
a |
newdata |
a |
... |
further arguments. Currently has no effect on the results. |
Value
A data.frame predicted combination scores (or probabilities)
and labels
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Examples
# call data
data(laparotomy)
# define the function parameters
markers <- laparotomy[, -1]
status <- factor(laparotomy$group, levels = c("not_needed", "needed"))
event <- "needed"
score1 <- linComb(
markers = markers, status = status, event = event,
method = "logistic", resample = "none",
standardize = "none", direction = "<", cutoff.method = "Youden"
)
comb.score1 <- predict(score1, markers)
score2 <- nonlinComb(
markers = markers, status = status, event = "needed", include.interact = TRUE,
method = "polyreg", resample = "repeatedcv", nfolds = 5,
nrepeats = 10, cutoff.method = "Youden", direction = "<"
)
comb.score2 <- predict(score2, markers)
score3 <- mathComb(
markers = markers, status = status, event = event,
method = "distance", distance = "euclidean", direction = "<",
standardize = "tScore", cutoff.method = "Youden"
)
comb.score3 <- predict(score3, markers)
Print the summary of linComb, nonlinComb, mlComb and mathComb functions.
Description
The print_train function prints the summary statistics of
the fitted model
Usage
print_train(print_model)
Arguments
print_model |
a |
Value
No return value writes a summary of the results to the console.
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Generate ROC curves and related statistics for the given markers and Combination score.
Description
The rocsum function returns the ROC curves with
coordinates, Area Under the Curves of markers and combination score, Area Under
the Curve comparison of markers and combination score, Confusion matrices for both
markers and combination score with the cutoff values derived from the ROC Curves.
Usage
rocsum(
markers = NULL,
comb.score = NULL,
status = NULL,
event = NULL,
direction = c("<", ">"),
conf.level = 0.95,
cutoff.method = c("CB", "MCT", "MinValueSp", "MinValueSe", "ValueSp", "ValueSe",
"MinValueSpSe", "MaxSp", "MaxSe", "MaxSpSe", "MaxProdSpSe", "ROC01", "SpEqualSe",
"Youden", "MaxEfficiency", "Minimax", "MaxDOR", "MaxKappa", "MinValueNPV",
"MinValuePPV", "ValueNPV", "ValuePPV", "MinValueNPVPPV", "PROC01", "NPVEqualPPV",
"MaxNPVPPV", "MaxSumNPVPPV", "MaxProdNPVPPV", "ValueDLR.Negative",
"ValueDLR.Positive", "MinPvalue", "ObservedPrev", "MeanPrev", "PrevalenceMatching"),
show.plot = show.plot
)
Arguments
markers |
a |
comb.score |
a matrix of |
status |
a |
event |
a |
direction |
a |
conf.level |
a |
cutoff.method |
a |
show.plot |
a |
Value
A list of numeric ROC Curves, AUC statistics and Confusion
matrices.
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Standardization according to the training model parameters.
Description
The std.test Standardization parameters will be taken
from the fitted training model and applied to the new data set.
Usage
std.test(newdata, model)
Arguments
newdata |
a |
model |
a |
Value
A numeric dataframe of standardized biomarkers
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Standardization according to the chosen method.
Description
The std.train Standardization (min_max_scale, zScore etc.) can be
estimated from the training data and applied to any dataset with the same
variables.
Usage
std.train(data, standardize = NULL)
Arguments
data |
a |
standardize |
a
|
Value
A numeric data.frame of standardized biomarkers
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Examples
# call data
data(laparotomy)
# define the function parameters
markers <- laparotomy[, -1]
markers2 <- std.train(markers, "deviance")
Mathematical transformations for biomarkers
Description
Applies a selected mathematical transformation ("log", "exp", "sin", or "cos") to biomarker data.
Usage
transform_math(markers, transform)
Arguments
markers |
A |
transform |
A character string specifying the transformation method to be applied.
Supported methods are: |
Value
A numeric data frame containing the transformed biomarkers.
Author(s)
Serra Ilayda Yerlitas Tastan, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Examples
data(laparotomy)
markers <- laparotomy[, -1]
transform_math(markers, transform = "log")
Validate parameters specific to linComb
Description
Internal helper used by linComb to validate linear-combination-specific
arguments. It checks the selected combination method, resampling method,
standardization method, and method-specific standardization requirements.
It also adjusts nrepeats when resample = "cv" and forces the
required standardization for selected methods.
Usage
validateLinComb(
method = c("scoring", "SL", "logistic", "minmax", "PT", "PCL", "minimax", "TS"),
resample = c("none", "cv", "repeatedcv", "boot"),
nfolds = 5,
nrepeats = 3,
niters = 10,
standardize = c("none", "min_max_scale", "zScore", "tScore", "scale_mean_to_one",
"scale_sd_to_one"),
ndigits = 0
)
Arguments
method |
A character string specifying the linear combination method.
Available methods are |
resample |
A character string specifying the resampling method. Available
options are |
nfolds |
A positive integer indicating the number of folds for cross-validation-based resampling methods. Default is 5. |
nrepeats |
A positive integer indicating the number of repeats for
|
niters |
A positive integer indicating the number of bootstrap
resampling iterations when |
standardize |
A character string specifying the standardization method.
Available options are |
ndigits |
A non-negative integer indicating the number of decimal places
used for rounding coefficients in the |
Details
The "minmax" and "PCL" methods require
standardize = "min_max_scale". If another standardization method is
supplied, it is replaced with "min_max_scale" and a warning is issued.
The "PT" method requires standardize = "zScore". If another
standardization method is supplied, it is replaced with "zScore" and a
warning is issued.
Value
A list containing the validated and prepared values:
method, resample,
nfolds, nrepeats, niters,
standardize, and ndigits.
Validate parameters specific to mathComb
Description
Internal helper used by mathComb to validate mathematical-combination
specific arguments. It checks the selected mathematical operator, distance
metric, standardization method, transformation method, and marker-value
requirements for selected transformations.
Usage
validateMathComb(
markers,
method = c("add", "multiply", "divide", "subtract", "distance", "baseinexp",
"expinbase"),
distance = c("euclidean", "manhattan", "chebyshev", "kulczynski_d", "lorentzian",
"avg", "taneja", "kumar-johnson"),
standardize = c("none", "min_max_scale", "zScore", "tScore", "scale_mean_to_one",
"scale_sd_to_one"),
transform = c("none", "log", "exp", "sin", "cos")
)
Arguments
markers |
A numeric data frame or matrix containing the marker values.
Marker values must be finite. If |
method |
A character string specifying the mathematical combination
method. Available methods are |
distance |
A character string specifying the distance metric used when
|
standardize |
A character string specifying the standardization method.
Available options are |
transform |
A character string specifying the transformation applied to
marker values. Available options are |
Value
A list containing the validated and prepared values:
standardize and transform.
Validate parameters specific to mlComb
Description
Internal helper used by mlComb to validate machine-learning-specific
arguments before fitting the caret model. It checks the selected
method, resampling method, resampling control parameters, preprocessing
options, bagging parameter, and oob/adaptive resampling restrictions.
Usage
validateMlComb(
niters = 10,
nfolds = 5,
nrepeats = 3,
preProcess = NULL,
B = 25,
p = 0.75,
resample = "none",
method = NULL
)
Arguments
niters |
A positive integer indicating the number of bootstrap
resampling iterations. Used for |
nfolds |
A positive integer. For |
nrepeats |
A positive integer indicating the number of repeats for
|
preProcess |
A character vector specifying preprocessing methods passed
to |
B |
A positive integer indicating the number of bootstrap samples for
bagging classifiers such as |
p |
A numeric value between 0 and 1 specifying the training proportion
used for |
resample |
A character string specifying the resampling method. Allowed
values are |
method |
A character string specifying the |
Details
The "oob" resampling method is restricted to suitable random forest,
bagged tree, bagged earth, bagged flexible discriminant analysis, and
conditional tree forest methods.
For "adaptive_cv" and "adaptive_LGOCV", nfolds must be
greater than 5. For "repeatedcv", nrepeats must be at least 2.
Value
Invisibly returns TRUE if all checks pass. Otherwise, an error
is thrown.
Validate parameters specific to nonlinComb
Description
Internal helper used by nonlinComb to validate
nonlinear-combination-specific arguments. It checks the selected nonlinear
combination method, polynomial degrees, spline/GAM degrees of freedom,
resampling method and related resampling parameters, standardization method,
interaction option, and elastic net mixing parameter.
Usage
validateNonlinComb(
method = c("polyreg", "ridgereg", "lassoreg", "elasticreg", "splines", "sgam", "nsgam"),
degree1 = 3,
degree2 = 3,
df1 = 4,
df2 = 4,
resample = c("none", "cv", "repeatedcv", "boot"),
nfolds = 5,
nrepeats = 3,
niters = 10,
standardize = c("none", "min_max_scale", "zScore", "tScore", "scale_mean_to_one",
"scale_sd_to_one"),
include.interact = FALSE,
alpha = 0.5
)
Arguments
method |
A character string specifying the nonlinear combination method.
Available methods are |
degree1 |
A positive integer specifying the polynomial degree for the first marker in polynomial-based methods. Default is 3. |
degree2 |
A positive integer specifying the polynomial degree for the second marker in polynomial-based methods. Default is 3. |
df1 |
A positive integer specifying the degrees of freedom for the first marker in spline/GAM-based methods. Default is 4. |
df2 |
A positive integer specifying the degrees of freedom for the second marker in spline/GAM-based methods. Default is 4. |
resample |
A character string specifying the resampling method. Available
options are |
nfolds |
A positive integer indicating the number of folds for cross-validation-based resampling methods. Default is 5. |
nrepeats |
A positive integer indicating the number of repeats for
|
niters |
A positive integer indicating the number of bootstrap
resampling iterations when |
standardize |
A character string specifying the standardization method.
Available options are |
include.interact |
A logical value indicating whether the interaction
term between the two markers should be included in polynomial-based methods.
Default is |
alpha |
A numeric value between 0 and 1 specifying the elastic net mixing
parameter when |
Value
A list containing the validated and prepared values:
method, degree1, degree2, df1, df2,
resample, nfolds, nrepeats, niters,
standardize, include.interact, and alpha.
Validate and prepare common diagnostic-combination parameters
Description
Internal helper used to validate and prepare parameters shared by diagnostic
combination functions. It checks marker data, disease status, event class,
ROC direction, confidence level, cutoff method, and display options. It also
converts markers to a data frame and status to a factor when
needed.
Usage
validateParameters(
markers = NULL,
status = NULL,
event = NULL,
method = NULL,
direction = c("<", ">"),
conf.level = 0.95,
cutoff.method = c("CB", "MCT", "MinValueSp", "MinValueSe", "ValueSp", "ValueSe",
"MinValueSpSe", "MaxSp", "MaxSe", "MaxSpSe", "MaxProdSpSe", "ROC01", "SpEqualSe",
"Youden", "MaxEfficiency", "Minimax", "MaxDOR", "MaxKappa", "MinValueNPV",
"MinValuePPV", "ValueNPV", "ValuePPV", "MinValueNPVPPV", "PROC01", "NPVEqualPPV",
"MaxNPVPPV", "MaxSumNPVPPV", "MaxProdNPVPPV", "ValueDLR.Negative",
"ValueDLR.Positive", "MinPvalue", "ObservedPrev", "MeanPrev", "PrevalenceMatching"),
show.plot = TRUE,
show.result = FALSE
)
Arguments
markers |
A numeric data frame or matrix with exactly two columns. Each column should contain one diagnostic marker. |
status |
A factor or vector indicating the true disease status. It must contain exactly two non-missing classes, and both classes must be represented in the data. |
event |
A single non-missing value indicating which level of
|
method |
A character string specifying the model or combination method. This argument is returned unchanged; method-specific validation should be handled by the calling function. |
direction |
A character string specifying the ROC direction. Possible
values are |
conf.level |
A numeric value between 0 and 1 specifying the confidence level used for ROC-related summaries. |
cutoff.method |
A character string specifying the cutoff selection method used for ROC analysis. |
show.plot |
A logical value indicating whether the ROC plot should be displayed. |
show.result |
A logical value indicating whether results should be printed to the console. |
Value
A list containing the validated and prepared values:
markers, status, event, method,
direction, conf.level, cutoff.method,
show.plot, and show.result.