paired.concordance.index.withsim: Takes two numerical vectors and computes the concordance...

View source: R/paired.concordance.index.withsim.R

paired.concordance.index.withsimR Documentation

Takes two numerical vectors and computes the concordance index between them by comparing the order of values for two pairs of data each time

Description

This function returns the concordance index and its p-value along with the lower and upper confidence intervals of said p-value.

Usage

paired.concordance.index.withsim(
  predictions,
  observations,
  delta.pred = 0,
  delta.obs = 0,
  alpha = 0.05,
  outx = FALSE,
  alternative = c("two.sided", "less", "greater"),
  logic.operator = c("and", "or"),
  CPP = TRUE,
  comppairs = 10,
  simulate.p.value = FALSE,
  ncores = 2
)

Arguments

predictions

numeric A vector of predicted drug responces which could be either continuous or discrete

observations

numeric A vector of observed continuous drug responces

delta.pred

numeric The minimunm reliable difference between two values in the predictions vector to be considered as significantly various values.

delta.obs

numeric The minimunm reliable difference between two values in the observations vector to be considered as significantly various values. In drug sensitivity , default value for delta.pred is picked by looking into delta auc values (drug response metric) between biological replicates across three large pharmacogenomic studies, CTRPv2 (370 drugs over ~15-20 cells), GDSC (1 drug over ~600 cells), GRAY (85 drugs over ~10-50 cells)

alpha

numeric alpha level to compute confidence interval

outx

boolean set to TRUE to not count pairs of predictions that are tied as a relevant pair. This results in a Goodman-Kruskal gamma type rank correlation.

alternative

character What is the alternative hypothesis? Must be one of "two.sides", "less", and "greater" and defaults to two.sides".

logic.operator

character determines how strict should the test be to remove noisy pairs. Must be one of "and" or "or" and defaults to "and".

CPP

boolean Whether to use the C version of the code for faster execution

comppairs

numeric minimum number of pairs to calculate a valid CI

Value

[list] ! list of concordance index and its pvalue along with the lower and upper confidence intervals

Examples

data(PLX4720_data)
pci_PLX4720 <- paired.concordance.index(predictions = PLX4720_data[ ,"AAC_CTRPv2"],
observations = PLX4720_data[ ,"AAC_GDSC"], delta.pred = 0, delta.obs = 0,
outx = TRUE)
pci_PLX4720$cindex


bhklab/wCI documentation built on Jan. 26, 2024, 5:36 p.m.