convertToProp {nplr} | R Documentation |
Function to Convert a Vector Into Proportions.
Description
Convert a vector of values to proportions, given a minimun and a maximun value (optional).
See Details
and Examples
.
Usage
convertToProp(y, T0 = NULL, Ctrl = NULL)
Arguments
y |
: a vector of values (responses to x). |
T0 |
: the minimal value to consider. If NULL (default), |
Ctrl |
: the maximal value to consider. If NULL (default), |
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]:
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
Examples
## 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)