Description Usage Arguments Details Value Warning Note Author(s) References See Also Examples
View source: R/convertToProp.R
Convert a vector of values to proportions, given a minimun and a maximun value (optional).
See Details
and Examples
.
1 | convertToProp(y, T0 = NULL, Ctrl = NULL)
|
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), |
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
.
a vector of values.
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.
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.
Frederic Commo, Brian M. Bot
1 - https://dtp.nci.nih.gov/branches/btb/ivclsp.html
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)
|
Testing pars...
The 5-parameters model showed better performance
Testing pars...
The 5-parameters model showed better performance
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.