Development build · main @ 589f3ced80 · 2026-12-04 · May describe features that are not in a release yet Manual overviewA–Z index

Fit a dose-response curve and find the EC50

On this page

Goal

Fit a dose-response standard curve to duplicate data. By the end you will have a four-parameter logistic (4PL) fit on log concentration with its EC50, interpolated unknowns, ROUT outlier flags, a 4PL-versus-5PL comparison, and a way to rescue unstable fits with constraints.

You need: CurveBook installed and the basics from the first curve-fit tutorial, which walks through a simpler version of this fit.


Seeded dataset

Clean-room synthetic agonist assay (Agonist Dose-Response, XY table with concentration in molar units and two replicate responses; the last two rows leave X blank to interpolate unknown concentrations, and one replicate at 1e-7 M is a high outlier):

Conc (M)Response:Y1Response:Y2
1e-104.85.3
1e-96.16.9
1e-815.216.4
1e-752.198.5
1e-686.488.1
1e-595.096.2
1e-497.898.4
(blank)50.052.0
(blank)80.078.0

Desktop app steps

1. Enter the XY data

  1. On Welcome to CurveBook, click New Data Table, then XY.
  2. Next to Data Sets, click − until it shows 1. Choose Replicates and set Replicates (k) to 2.
  3. Click Create Table, click the first X cell, and paste the dataset above. Leave X blank on the two unknown-sample rows at the bottom.

You should see: seven standards with two replicates each, and two rows with responses but no X.

2. Convert concentrations to log10

The 4PL model used below expects log concentration.

  1. Click Analyze, choose Transform Math (Log / Exp / Scale / Lineweaver–Burk), and click OK.
  2. Choose Analyze › Change Analysis Parameters… (Cmd/Ctrl+Alt+P), select log10(X) for X, leave Y unchanged, and click OK.

You should see: a linked transformed table with X from −10 to −4. Your molar values stay untouched in the original table.

3. Fit the 4PL curve with interpolation and ROUT

  1. With the transformed table open, click Analyze and choose Nonlinear Regression (Curve Fit).
  2. Under Concentration column scale, choose Log-transformed, then click OK. The Parameters: Nonlinear Curve Fitting dialog opens with log(agonist) vs. response, variable Hill slope (four parameters) selected on the Model tab.
  3. On the Output tab, tick Interpolate unknowns from standard curve and Plot 95% confidence bands.
  4. On the Weight tab, choose ROUT Outlier Detection + Refit. ROUT uses Q = 1%.
  5. Click Run Analysis.

You should see: a results sheet with Bottom, Top, LogEC50, and HillSlope on Best-fit values & confidence intervals, EC50 on Derived values & confidence intervals, the 98.5 spike at 10⁻⁷ M on Outliers, and interpolated X for the two unknowns.

Profile-likelihood confidence intervals are not available together with ROUT. For asymmetric EC50 intervals, make a second fit with the default weighting and choose Profile-likelihood asymmetrical CIs (recommended) on Output.

4. Compare 4PL with 5PL

  1. On the fit's results sheet, choose Analyze › Change Analysis Parameters….
  2. On the Compare tab, choose Extra sum-of-squares F test (nested models) and pick Asymmetric (five parameters) log(agonist) vs. response as the alternative model.
  3. Click OK.

You should see: a comparison telling you whether the extra asymmetry parameter is justified by the data.

5. Find and fix unstable parameters

  1. Open Analyze › Change Analysis Parameters… and tick Identify unstable / ambiguous parameters on the Output tab. Click OK.
  2. If the fit status reads Ambiguous or a parameter is marked (Unstable), reopen the dialog and go to the Constrain tab.
  3. Set a parameter you know from the experiment to Constant (for example Bottom at 0), or set HillSlope to Shared global across curves. Click OK.

You should see: the fit converge with finite confidence intervals.

Alternative: fit straight from a tidy table

If your data are in long format (one row per well with a group column), create a Multiple Variables table instead. In the fit dialog's Data tab, bind X, Y, and the grouping column directly; no reshaping is needed.


CLI and MCP steps

Save the dataset above as dose-response.csv and run this curvebook.batch.v1 manifest (dose-response-workflow.json):

{
  "schema": "curvebook.batch.v1",
  "inputs": [
    {
      "path": "dose-response.csv",
      "sheet": "data-1",
      "kind": "xy",
      "subcolumn_mode": "raw_replicates"
    }
  ],
  "commands": [
    {
      "cmd": "transform.run",
      "params": {
        "sheet_id": "log-x",
        "source_sheet_id": "data-1",
        "kind": "transform.math",
        "x_transform": "log10",
        "y_transform": null,
        "title": "Log10(Conc)"
      }
    },
    {
      "cmd": "fit.run",
      "params": {
        "sheet_id": "fit-4pl-rout",
        "source_sheet_id": "log-x",
        "equation_id": "log_agonist_vs_response_4pl",
        "method": "rout",
        "identify_unstable_parameters": true,
        "interpolate_unknowns": true,
        "title": "4PL Dose-Response (ROUT)"
      }
    },
    {
      "cmd": "fit.run",
      "params": {
        "sheet_id": "fit-5pl",
        "source_sheet_id": "log-x",
        "equation_id": "log_agonist_vs_response_5pl",
        "title": "5PL Asymmetric Dose-Response"
      }
    },
    {
      "cmd": "graph.create",
      "params": {
        "sheet_id": "graph-ec50",
        "data_sheet_id": "log-x",
        "kind": "xy",
        "title": "Agonist 4PL Dose-Response"
      }
    },
    {
      "cmd": "graph.setRegressionOverlay",
      "params": {
        "sheet_id": "graph-ec50",
        "result_sheet_id": "fit-4pl-rout",
        "show_confidence_band": true
      }
    },
    {
      "cmd": "analysis.exportJson",
      "params": {
        "sheet_id": "fit-4pl-rout",
        "path": "ec50-fit.json",
        "pretty": true
      }
    },
    {
      "cmd": "result.generateReport",
      "params": {
        "result_sheet_id": "fit-4pl-rout",
        "format": "markdown",
        "path": "ec50-methods.md"
      }
    }
  ],
  "exports": [
    { "out": "dose-response.curvebook", "format": "curvebook" },
    { "sheet": "graph-ec50", "out": "ec50-curve.svg", "format": "svg" }
  ]
}

Run the manifest:

curvebook-cli batch dose-response-workflow.json --workdir . --json

In an MCP client, invoke the same commands with command_run and inspect the fitted LogEC50, EC50, profile-likelihood 95% CI, and outlier flags via result://fit-4pl-rout.


Reading the results

  • Best-fit parameters: Check Bottom, Top, LogEC50, HillSlope, and the derived EC50 (10LogEC50). Because log10(EC50) has a more symmetric sampling distribution than EC50, report the asymmetrical profile-likelihood 95% CI.
  • Goodness of fit: Review R2, adjusted R2, residual standard deviation Sy.x (scaled by residual degrees of freedom), RMSE (scaled by observation count), residual normality, and the replicates test for lack of fit.
  • Outliers: With ROUT (Q = 1%), CurveBook excludes flagged spikes from the final fit while keeping them visible with an outlier badge on the plot.
  • Unstable parameters: If a parameter is marked (Unstable) or the fit status is Ambiguous, the confidence interval is wide or unbounded. Collect more concentrations near the plateau or constrain Bottom/Top to physically justified bounds.
  • Interpolated unknowns: Check the Interpolated unknowns tab (and Interpolated Mean X / Interpolated Replicates when Y replicates are stored as subcolumns); CurveBook warns if an interpolated value extrapolates outside the fitted concentration range.
  • For solver details, weighting, profile-likelihood CIs, model comparison, and interpolation, see Curve fitting reference.

Exporting

  • Fit table and interpolated unknowns: open the results sheet and choose File › Export › Results (CSV)… or File › Export › Results (JSON)….
  • Methods summary: File › Export › Methods Report….
  • Figure: open the linked graph (CurveBook draws the fitted curve and its confidence band automatically; switch or clear overlays on the Data tab of the Format Inspector), choose File › Export › Figure…, pick PDF (Vector), SVG (Vector), or PNG (Raster), and click Export.