Use logistic regression and bootstrap LOOCV to evaluate signatures.
Source:R/evaluate.R
SignatureQuantitative.Rd
This function takes as input a data.frame
with genetic expression
count data, and uses a bootstrapped leave-one-out cross validation procedure
with logistic regression to allow for numeric and graphical comparison
across any number of genetic signatures.
Usage
SignatureQuantitative(
df.input,
targetVec.num,
signature.list = NULL,
signature.name.vec = NULL,
num.boot = 100,
pb.show = TRUE
)
Arguments
- df.input
a
data.frame
of gene expression count data. Required.- targetVec.num
a numeric binary vector of the response variable. The vector should be the same number of rows as
df
. Required.- signature.list
a
list
of signatures to run with their associated genes. This list should be in the same format asTBsignatures
, included in the TBSignatureProfiler package. Ifsignature.list = NULL
, the default set of signaturesTBsignatures
list is used. For details, run?TBsignatures
.- signature.name.vec
A vector specifying the names of the signatures to be compared. This should be the same length as
signature.list
. Ifsignature.name.vec = NULL
, the default set of signaturesTBsignatures
list is used.- num.boot
an integer specifying the number of bootstrap iterations.
- pb.show
logical. If
TRUE
then a progress bar for the bootstrapping procedure will be displayed as output. The default isTRUE
.- name
a character string giving a name for the outputted boxplot of bootstrapped AUCs. The default is
"Quantitative Evaluation of Signatures via Bootstrapped AUCs"
.
Examples
inputTest <- matrix(rnorm(1000), 100, 20,
dimnames = list(paste0("gene", seq.int(1, 100)),
paste0("sample", seq.int(1, 20))))
inputTest <- as.data.frame(inputTest)
targetVec <- sample(c(0,1), replace = TRUE, size = 20)
signature.list <- list(sig1 = c("gene1", "gene2", "gene3"),
sig2 = c("gene4", "gene5", "gene6"))
signature.name.vec <- c("sig1", "sig2")
num.boot <- 2
SignatureQuantitative(inputTest, targetVec.num = targetVec,
signature.list = signature.list,
signature.name.vec = signature.name.vec,
num.boot = num.boot)
#>
|
| | 0%
|
|=================================== | 50%
|
|======================================================================| 100%
#> $df.auc.ci
#> Estimate CI lower.5% CI upper.95% Std. Error
#> sig1 0.6875 0.936205 0.974095 1.110223e-16
#> sig2 0.0000 0.390865 0.676435 1.110223e-16
#>
#> $df.sensitivity.ci
#> Estimate.Sensitivity CI lower.5% CI upper.95% Std. Error
#> sig1 0.7500000 0.8502747 0.9244505 1.110223e-16
#> sig2 0.6666667 0.6717949 0.7641026 0.000000e+00
#>
#> $df.specificity.ci
#> Estimate.Specificity CI lower.5% CI upper.95% Std. Error
#> sig1 0.5 0.5761905 0.6619048 -1.110223e-16
#> sig2 0.0 0.4321429 0.4964286 -5.551115e-17
#>