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

View source: R/paired.concordance.index.weighted.version.R

paired.concordance.index.weighted.versionR 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 return the concordance index and its p-value along with the lower and upper confidence intervals of said p-value.

Usage

paired.concordance.index.weighted.version(
  predictions,
  observations,
  delta.pred = 0,
  delta.obs = 0,
  weightingFun_pred,
  weightingFun_obs,
  alpha = 0.05,
  outx = FALSE,
  alternative = c("two.sided", "less", "greater"),
  logic.operator = c("and", "or"),
  CPP = TRUE,
  comppairs = 10
)

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)

weightingFun_pred

function function to weight the delta values of predictions

weightingFun_obs

function function to weight the delta values of observations

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 be the test 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)

pciw_PLX4720 <- paired.concordance.index.weighted.version(
  predictions = PLX4720_data[ ,"AAC_CTRPv2"],
  observations = PLX4720_data[ ,"AAC_GDSC"], delta.pred = 0, delta.obs = 0,
  outx = TRUE)

pciw_PLX4720$cindex


bhklab/mCI documentation built on Jan. 18, 2024, 4:09 a.m.