This function computes a weighted n-parameters logistic regression, given x (typically compound concentrations) and y values (responses: optic densities, fluorescence, cell counts,...). See
: a vector of numeric values, e.g. a vector of drug concentrations.
: a vector of numeric values, e.g. a vector of responses, typicaly provided as proportions of control.
: Logical. Should x-values be Log10-transformed. Default to
: a coefficient to adjust the weights. LPweight = 0 will compute a non-weighted np-logistic regression.
: a numeric value (or
: a character string to specify what weight method to use. Options are
: Logical. Specify whether
The 5-parameter logistic regression is of the form:
y = B + (T - B)/[1 + 10^(b*(xmid - x))]^s
T are the bottom and top asymptotes, respectively,
xmid are the Hill slope and the x-coordinate at the inflexion point, respectively, and s is an asymetric coefficient. This equation is sometimes refered to as the Richards' equation [1,2].
npars = 4, the
s parameter is forced to be
1, and the corresponding model is a 4-parameter logistic regression, symetrical around its inflexion point. When specifying
npars = 3 or npars = 2, add 2 more constraints and force
T to be
The model parameters are optimized, simultaneously, using nlm, given a sum of squared errors function, sse(Y), to minimize:
sse(Y) = Σ [W.(Yobs - Yfit)^2 ]
where Yobs, Yfit and W are the vectors of observed values, fitted values and weights, respectively.
In order to reduce the effect of possible outliers, the weights can be computed in different ways, specified in
W = (1/residuals)^LPweight
LPweight are the squared error between the observed and fitted values, and a tuning parameter, respectively. Best results are generally obtained by setting LPweight = 0.25 (default value), while setting LPweight = 0 results in computing a non-weighted sum of squared errors.
W = 1/Var(Yobs_r)
Var(Yobs_r) is the vector of the within-replicates variances.
W = 1/Yfit^LPweight
Yfit are the fitted values. As for the residuals-weights method, setting LPweight = 0 results in computing a non-weighted sum of squared errors.
standard weights and
general weights methods are describes in .
An object of class
x : the x values as they are used in the model. It can be
useLog was set to
y : the y values.
useLog : logical.
npars : the best number of parameters if
npars="all", the specified number of parameters, otherwise.
LPweight : the weights tuning parameter.
yFit : the y fitted values.
xCurve : the x values generated to draw the curve. 200 points between the
max of x.
yCurve : the fitted values used to draw the curve. the fitted values corresponding to
inflPoint : the inflexion point x and y coordinates.
goodness : the goodness-of-fit. The correlation between the fitted and the observed y values
stdErr : the mean squared error between the fitted and the observed y values
pars : the model parameters.
AUC : the area under the curve estimated using both the trapezoid method and the Simpson's rule.
The data used in the examples are samples 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- Richards, F. J. (1959). A flexible growth function for empirical use. J Exp Bot 10, 290-300.
2- Giraldo J, Vivas NM, Vila E, Badia A. Assessing the (a)symmetry of concentration-effect curves: empirical versus mechanistic models. Pharmacol Ther. 2002 Jul;95(1):21-45.
3- Motulsky HJ, Brown RE. Detecting outliers when fitting data with nonlinear regression - a new method based on robust nonlinear regression and the false discovery rate. BMC Bioinformatics. 2006 Mar 9;7:123.
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.