How it works

DoseFit is deliberately transparent. Here is exactly what the fitter computes — no black box, no hidden parameters.

The model — 4-parameter logistic (4PL)

Every fit uses the standard four-parameter logistic curve used across pharmacology:

y = bottom + (top − bottom) / (1 + (EC50 / dose)hill)

The four parameters are the bottom and top plateaus, the EC50 (the dose at the half-maximal response — your IC50 for an inhibition curve), and the Hill slope, which captures steepness. The same model handles both increasing (agonist) and decreasing (inhibition) curves.

Fitting — grid search + analytic least squares

For any fixed EC50 and Hill slope, the model is linear in the two plateaus, so those are solved exactly from the 2×2 least-squares normal equations. DoseFit therefore searches a coarse-to-fine grid over EC50 (log-spaced) and Hill slope, solving the plateaus analytically at each grid point and keeping the lowest sum-of-squared-error fit, then refining around it. This avoids the starting-value sensitivity and non-convergence that iterative solvers can hit — there is no library, no random seed in the fit itself, and the same data always gives the same answer.

Confidence intervals — residual bootstrap

The 95% confidence intervals and the shaded band come from an 800-sample residual bootstrap: the residuals are resampled with replacement onto the fitted curve and the model is re-fit each time, and the 2.5th–97.5th percentiles of each parameter are reported. The random number generator is seeded from the data (a deterministic mulberry32 PRNG), so intervals are reproducible — re-running the same data reproduces the same CI. Noisier data widens the intervals honestly; this is the credibility line that separates a real fit from a line through dots.

Weighting

Assay error is often proportional to signal, not constant. DoseFit offers 1/Y and 1/Y² relative weighting in addition to ordinary least squares. Weights are derived from the predicted response and applied with iterative reweighting — the standard scheme Prism uses — then held fixed for a √w-standardized bootstrap so the intervals remain valid under weighting. The reported R² switches to its weighted form when weighting is on.

Outlier flagging — advisory, never automatic

Possible outliers are flagged using a robust z-score (median absolute deviation) on the raw distance from the fitted curve, with a cutoff of 3σ and a minimum-deviation gate (greater than 6% of the response range) so a near-perfect fit can't flag ordinary noise. Flagged points are highlighted on the chart — but they are never removed from the fit automatically. The judgement stays with you.

Compare to literature — live from ChEMBL

The literature overlay queries the public EBI ChEMBL activity API for a chosen target and measure (IC50, EC50, or Ki). Censored values (reported as “>” or “<”) and non-molar units are excluded; the rest are converted to a common molar basis and summarized as a median, interquartile range, and 10–90% range. This is the distribution across all listed ligands for that target — not your specific compound — and it is presented that way. Only a target identifier is sent to ChEMBL; your data is never transmitted.

What DoseFit will not do

DoseFit is a measurement tool. It reports what your data say — the fit and its uncertainty — and makes no scientific, diagnostic, or medical claim. If your dose range doesn't bracket the EC50 and the curve never crosses half-max, the right answer is “your assay can't resolve this,” not a confident invented number. The tool is built to be honest about that.

Try it on an example →