Skip to content

Inverse Prediction

After fitting a single-drug analysis, the Predict concentration from response table (next to the residuals plot) lets you go backwards on the dose-response curve: type a response value in the first column, read off the corresponding concentration and its 95% confidence interval in the other columns.

This is sometimes called inverse prediction or calibration, and it is the everyday question every dose-response curve is meant to answer:

"My new sample produced response \(y\). What concentration does that correspond to?"

How it works

The table reuses the data already plotted on the dose-response chart:

  • the central fitted curve \(\hat{y}(x)\) on a 200-point log-spaced concentration grid,
  • the lower and upper 95% bands \(\hat{y}_\text{lo}(x)\) and \(\hat{y}_\text{hi}(x)\) computed via the delta method on the parameter covariance.

For a target response \(y^\star\):

Column Definition
Concentration \(x\) such that linearly interpolating \(\hat{y}\) between adjacent grid points crosses \(y^\star\).
95% CI low \(\min(x_\text{lo}, x_\text{hi})\) where \(x_\text{lo}, x_\text{hi}\) are the band crossings.
95% CI high \(\max(x_\text{lo}, x_\text{hi})\).

The lower / upper assignment is automatic, so the table behaves the same way for inhibition (response decreases with concentration) and activation (response increases with concentration).

Reading the result

Geometrically, drop a horizontal line at \(y = y^\star\). Where it crosses the central curve gives the central estimate; where it crosses the shaded 95% band gives the CI:

  • a narrow CI means the curve is steep and well-determined at that response — you can pin the concentration tightly,
  • a wide CI means the curve is flat or the fit is uncertain near \(y^\star\) — small response changes correspond to large concentration changes.

When the answer is "out of range"

If \(y^\star\) is above the upper asymptote or below the lower one, no concentration on the curve produces it, and the table shows out of range. Common causes:

  • the new measurement is contaminated or off-scale,
  • the assay's effective range is narrower than the original titration covered,
  • the fit's asymptotes \(\text{effect}_0\) or \(\text{effect}_\infty\) are themselves poorly estimated (look at their CIs in the parameter table).

If only the band crossings are out of range — but the central one is not — the entry is shown without CI bounds; the curve still gives a point estimate, but the band does not extend to that response.

Limitations

  • The CI is read off the same band the plot draws. If you have configured the band to include observation noise (variance model or lognormal noise), the CI inherits that — it is then a prediction-band CI on the concentration, not just a parameter-uncertainty CI. This is usually what you want.
  • Linear interpolation between adjacent log-spaced grid points introduces a small error (sub-1% for typical curves). This is well below the statistical uncertainty in the CI.
  • Multiple intersections (e.g. a non-monotonic curve) are not handled — the Hill model is monotonic so this is not a concern in practice.
Implementation details

Frontend: inversePredict() in app/frontend/src/lib/plots/hill.ts consumes the same x, y, ciLower, ciUpper arrays used by the dose-response plot. The table component is InversePredictionTable.svelte. There is no backend endpoint — the math is a few lines of linear interpolation in the browser. Tests live in app/frontend/src/lib/plots/inverse-predict.test.ts.