convertToProp: Function to Convert a Vector Into Proportions.

Description Usage Arguments Details Value Warning Note Author(s) References See Also Examples

Description

Convert a vector of values to proportions, given a minimun and a maximun value (optional). See Details and Examples.

Usage

1
convertToProp(y, T0 = NULL, Ctrl = NULL)

Arguments

y

: a vector of values (responses to x).

T0

: the minimal value to consider. If NULL (default), min(y, na.rm=TRUE) will be used. See Details and Warning.

Ctrl

: the maximal value to consider. If NULL (default), max(y, na.rm=TRUE) will be used. See Details and Warning.

Details

In typical cell viability experiments, responses to drug concentrations (inhibition rate) may be estimated with respect to a time zero (T0) and an untreated condition values (Ctrl), as described in [1]:

prop(y) = (y - T0)/(Ctrl - T0)

If none of the T0 and Ctrl values are provided, min(y, na.rm=TRUE) and max(y, na.rm=TRUE) will be used, respectively. See Warning.

Value

a vector of values.

Warning

Note that, for drug response analyses, rescaling the responses between 0 to 1 using to the min and max of y, would lead to estimate a EC50 (the half effect between the maximum and the minimum of the observed effects), rather than a IC50.

Note

The data used as examples come from the NCI-60 Growth Inhibition Data: https://wiki.nci.nih.gov/display/NCIDTPdata/NCI-60+Growth+Inhibition+Data, except for multicell.tsv which are simulated data.

Author(s)

Frederic Commo, Brian M. Bot

References

1 - https://dtp.nci.nih.gov/branches/btb/ivclsp.html

See Also

nplr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Using the MDA-N data
  op <- par(no.readonly=TRUE)         # save default parameters

  require(nplr)
  path <- system.file("extdata", "mdan.txt", package = "nplr")
  mdan <- read.delim(path)
  
# fit a model on the original responses (proportions of control):
  conc <- mdan$CONC
  y0 <- mdan$GIPROP
  model0 <- nplr(conc, y0)

# Adjust the data between 0 to 1, then fit a new model:
  y1 <- convertToProp(y0)
  model1 <- nplr(conc, y1)
  
  par(mfrow=c(1, 2))
  plot(model0, ylim = range(0, 1), main = "Original y values")
  plot(model1, ylim = range(0, 1), main = "Rescaled y values")
  par(op)

fredcommo/nplr documentation built on May 16, 2019, 2:41 p.m.