Author-reviewedEvidence: highv1.0.2

Curve Fitting

Curve fitting is estimating a mathematical function's parameters to match observed data, as when survival curves are fitted to trial data and extrapolated.

Last reviewed byDr Darrin Baines

Concept Architecture

Curve Fitting in Health Economic Modelling

A common use of curve fitting in health economic modelling is choosing a parametric survival function, estimating its parameters from trial data and using the fitted curve to predict survival after follow-up ends. A model needs the whole survival curve because mean survival, the area under that curve, drives life years and QALYs over a lifetime horizon. Trials rarely run long enough to observe it, so the fitted curve supplies the missing tail, and curves that track the same trial data closely can still imply very different mean survival and cost per QALY. The NICE Decision Support Unit's Technical Support Documents 14 and 21 (TSD 14 and TSD 21) set out how such curves should be fitted, compared and justified in technology appraisal.

Why economic models need fitted curves

TSD 14 states that it is mean rather than median effects that matter for economic evaluations, so the entire survival distribution must be estimated. Because survival data are usually censored, only a mean restricted to the end of follow-up can be read directly from the Kaplan-Meier estimator.

TSD 14 concludes that parametric models should be used rather than restricted means approaches unless the data are almost entirely complete, since an analysis limited to the trial period is likely to underestimate the survival gain and the QALYs gained. The NICE manual (PMG36, sections 4.2.23 and 4.2.24) asks for a lifetime time horizon when technologies lead to differences in survival and notes that this often requires extrapolation beyond the clinical studies. The fitted function then feeds a partitioned survival model or a state transition model. When only published curves exist, the algorithm of Guyot and colleagues reconstructs approximate patient-level data from digitised Kaplan-Meier curves, and PMG36 (section 4.6.21) points to it.

The fitting criterion, least squares and likelihood

Every curve fit needs a function with unknown parameters and a criterion for the best match. For an uncensored continuous outcome, the least squares criterion in the NIST/SEMATECH statistics handbook chooses the parameters that minimise the sum of squared deviations between observed values and the curve.

Q=∑i=1n[yi−f(xi;β^)]2Q = \sum_{i=1}^{n} \left[ y_i - f(x_i; \hat{\beta}) \right]^2

where QQ is the sum of squared deviations, yiy_i is the observed response for observation ii, xix_i is its predictor value, such as time, ff is the chosen function and β^\hat{\beta} is the vector of estimated parameters. For nonlinear functions the handbook notes that the minimisation almost always needs iterative numerical algorithms.

Survival data need a different criterion, because a censored patient's time is only a lower bound on the true survival time. Parametric survival models are fitted by maximum likelihood estimation, and Jackson's log-likelihood for right-censored data reduces, with no delayed entry, to

log⁡L(θ)=∑i: ci=1[log⁡h(ti)−H(ti)]−∑i: ci=0H(ti)\log L(\theta) = \sum_{i:\, c_i = 1} \left[ \log h(t_i) - H(t_i) \right] - \sum_{i:\, c_i = 0} H(t_i)

where L(θ)L(\theta) is the likelihood of the parameter vector θ\theta, tit_i is the observed time for patient ii, cic_i equals 1 for an observed death and 0 for a censored time, h(t)h(t) is the hazard rate and H(t)H(t) is the cumulative hazard implied by the chosen distribution. Each death contributes the hazard at its time, and every patient contributes the probability of surviving to their last observed time. The least squares criterion has no term for censoring, which is one reason survival curves are fitted by likelihood to patient-level or reconstructed data. TSD 14 adds that standard survival methods are suitable only if censoring is uninformative.

Candidate curves and the hazards they assume

Each standard distribution fixes the shape the hazard can take, and that shape carries straight into the extrapolated tail. TSD 14 lists the exponential, Weibull, Gompertz, log-logistic, log normal and generalised gamma models as the standard set to consider, and TSD 21 summarises the hazard shapes each allows.

DistributionHazard shape it can represent
ExponentialConstant over time
WeibullMonotonically increasing or decreasing
GompertzMonotonically increasing or decreasing, log hazard linear in time
Log-logistic and log normalDecreasing, or rising then falling, often with long tails
Generalised gammaAny shape above, and also falling then rising, since it includes the Weibull and log normal as special cases

TSD 21 notes that none of these models can represent hazards with two or more turning points, a pattern it describes for many cancer trials, where mortality rises after entry, falls as the sicker patients die and later climbs again with age. More flexible options fitted by the same likelihood include spline-based models built from cubic splines, such as the Royston-Parmar model, piecewise models and cure models; PMG36 (section 4.6.25) names spline-based and cure approaches alongside standard parametric ones. When separate curves are fitted to each arm, TSD 14 advises using the same type of distribution in both, since a Weibull in one arm and a log normal in the other would need substantial justification.

How TSD 14 structures model selection

TSD 14 reviewed NICE appraisals of advanced and metastatic cancer completed by December 2009. Of the 32 appraisals that used parametric extrapolation, 22 (69%) gave some justification, but none gave a full one. The document therefore proposes a selection process.

  1. Inspect the observed hazards. Log-cumulative hazard plots show whether hazards look constant, monotonic or more complex and whether proportional hazards can be assumed.
  2. Fit the models the plots support. Straight lines point to candidate distributions and parallel lines support proportional hazards; otherwise piecewise or more flexible models are considered.
  3. Compare internal validity. The Akaike information criterion and Bayesian information criterion compare non-nested distributions and penalise extra parameters, BIC more heavily. With heavy censoring, external data, clinical plausibility and expert judgement are used to assess external validity.
  4. Select and test. The base case uses the most appropriate models, other plausible models enter as scenario analyses, and parameter uncertainty within each is carried into probabilistic sensitivity analysis.

TSD 14 also warns that the negative 2 log likelihood suits only nested models and was misused in past appraisals to compare distributions. It mentions split-sample validation, k-fold cross-validation and bootstrap resampling as further internal checks.

Fit within the data versus plausibility beyond it

A close fit to the trial period says little about the tail. TSD 14 points out that visual inspection, log-cumulative hazard plots and AIC or BIC address only internal validity, so substantial extrapolation needs validating by other means, such as registry data, longer trials or clinical opinion.

In a simulated example in TSD 21, the two models with the lowest AIC gave the poorest 40-year extrapolations, because AIC and BIC use only the available data and weight early follow-up, where events are most dense. TSD 21 recommends always plotting fitted and extrapolated hazard and survival functions with expected general population survival alongside, and incorporating background mortality from national life tables to avoid extremely implausible projections.

PMG36 (section 4.6.20) asks for both external and internal validity, with external validity judged on clinical and biological plausibility and coherence with external data, and for the limitations of statistical fit measures to be documented.

Worked example with three curves through the same trial data

The numbers in this example are illustrative. A single-arm trial follows 200 patients for 2 years and records 120 deaths over 240 person-years. The Kaplan-Meier estimate of survival is 0.60 at 1 year and 0.35 at 2 years.

1. Exponential fit by maximum likelihood. For the exponential the log-likelihood is maximised at deaths divided by person-time, so λ^=120/240=0.5\hat{\lambda} = 120/240 = 0.5 a year. Survival is e−0.5=0.607e^{-0.5} = 0.607 at 1 year and e−1=0.368e^{-1} = 0.368 at 2 years, and mean survival, the reciprocal of the rate, is 2 years.

2. Weibull matched to both Kaplan-Meier points. With S(t)=exp⁡[−(t/b)k]S(t) = \exp[-(t/b)^k], the cumulative hazards are −ln⁡0.60=0.511-\ln 0.60 = 0.511 and −ln⁡0.35=1.050-\ln 0.35 = 1.050, so the shape is k=ln⁡(1.050/0.511)/ln⁡2=1.039k = \ln(1.050/0.511)/\ln 2 = 1.039 and the scale b=1.909b = 1.909 years. Mean survival is b Γ(1+1/k)=1.909×0.985=1.88b\,\Gamma(1 + 1/k) = 1.909 \times 0.985 = 1.88 years, where Γ\Gamma is the gamma function.

3. Log-logistic matched to both points. With S(t)=1/[1+(t/α)β]S(t) = 1/[1 + (t/\alpha)^\beta], the odds of death by each time are 0.40/0.60 = 0.667 and 0.65/0.35 = 1.857, giving β=1.478\beta = 1.478 and α=1.316\alpha = 1.316 years. Mean survival is α(π/β)/sin⁡(π/β)=1.316×2.126/0.850=3.29\alpha (\pi/\beta)/\sin(\pi/\beta) = 1.316 \times 2.126/0.850 = 3.29 years.

CurveSurvival at 1 yearSurvival at 2 yearsMean to 2 yearsSurvival at 5 yearsSurvival at 10 yearsMean survival
Exponential0.6070.3681.260.0820.0072.00
Weibull0.6000.3501.250.0660.0041.88
Log-logistic0.6000.3501.270.1220.0483.29

4. Interpretation. Within the trial the three curves are almost indistinguishable, with means to 2 years of 1.25 to 1.27 years. The log-logistic tail then adds 2.02 years of mean survival beyond follow-up against 0.63 for the Weibull, so its mean is 1.41 years higher, or 0.99 undiscounted QALYs at an illustrative utility of 0.7. About 0.54 years of the log-logistic mean lies more than 40 years after the start, a projection that background mortality would remove for a cohort entering in later life. If registry data for comparable patients showed roughly 7% alive at 5 years, that would favour the exponential and Weibull tails. The choice between curves is a structural uncertainty, and each plausible curve belongs in a scenario analysis.

Uncertainty and decision use

A fitted curve brings two kinds of uncertainty into a model. TSD 14 notes that parameter uncertainty can be handled with each model's variance-covariance matrix, and that testing alternative distributions and durations of treatment effect are in effect structural sensitivity analyses. PMG36 (section 4.6.25) adds that functions with stable or decreasing variance over time are likely to underestimate uncertainty in the extrapolation.

TSD 21 states that no single type of model always gives the best extrapolation and, because the most accurate model can never be known, models reflecting a range of plausible long-term hazards should be presented. For the treatment effect after the trial, PMG36 (section 4.6.20) lists scenarios in which the effect stops or diminishes gradually, is sustained for people who continue treatment, or persists after stopping when lasting benefit is clinically plausible. TSD 14 notes that presenting the alternatives shows decision makers how far the choice of curve moves cost-effectiveness results such as the incremental cost-effectiveness ratio.

Where curve fitting meets related methods

Least squares curve fitting is a form of regression analysis, although survival curve fitting in a model aims at prediction beyond the data. Calibration adjusts model inputs until model outputs match observed targets, whereas curve fitting estimates one function's parameters directly from data. A very flexible function can fit noise as well as signal, the problem of overfitting that information criteria penalise. Prediction outside the observed range is covered under extrapolation.

Common misreadings of a fitted curve

Most errors come from treating a good fit within the data as evidence about the tail. Three recur in appraisals and in the methods literature.

  • A curve that follows the Kaplan-Meier closely is not thereby suitable. TSD 14 found appraisals justified by visual inspection alone and warns that a close fit can still have an implausible tail.
  • Hazard ratios do not transfer between models. TSD 14 states that it is theoretically incorrect to apply a hazard ratio from a different parametric model, or from a Cox model, to a fitted baseline curve.
  • Dropping awkward late data points is rarely justified. TSD 14 advises excluding points only when they are clearly shown to be erroneous outliers.

Sources

  • Guyot P, Ades AE, Ouwens MJNM, Welton NJ. Enhanced secondary analysis of survival data: reconstructing the data from published Kaplan-Meier survival curves. BMC Medical Research Methodology. 2012;12:9. https://doi.org/10.1186/1471-2288-12-9
  • Jackson CH. flexsurv: a platform for parametric survival modeling in R. Journal of Statistical Software. 2016;70(8):1-33. Section 2. https://doi.org/10.18637/jss.v070.i08
  • Latimer N. NICE DSU Technical Support Document 14: Survival analysis for economic evaluations alongside clinical trials, extrapolation with patient-level data. Sheffield: Decision Support Unit, ScHARR, University of Sheffield; 2011, last updated March 2013. Sections 1 to 6. https://doi.org/10.15131/shef.data.33745843
  • National Institute for Health and Care Excellence. NICE technology appraisal and highly specialised technologies guidance: the manual (PMG36). 2022, last updated 13 October 2026. Sections 4.2.23, 4.2.24, 4.6.20, 4.6.21 and 4.6.25. https://www.nice.org.uk/process/pmg36/chapter/economic-evaluation-2
  • NIST/SEMATECH. e-Handbook of Statistical Methods. Section 4.4.3.1, Least squares. National Institute of Standards and Technology; accessed 11 October 2026. https://www.itl.nist.gov/div898/handbook/pmd/section4/pmd431.htm
  • Rutherford MJ, Lambert PC, Sweeting MJ, Pennington B, Crowther MJ, Abrams KR, Latimer NR. NICE DSU Technical Support Document 21: Flexible methods for survival analysis. Sheffield: Decision Support Unit, ScHARR, University of Sheffield; 2020 (updated March 2022). Sections 2.1, 6.3 and 7. https://doi.org/10.15131/shef.data.33849118

Library

Publications

1
  • Guidance

    NICE DSU Technical Support Document 15: Cost-effectiveness modelling using patient-level simulation — Davis, Stevenson, Tappenden & Wailoo, TSD 15 ed., 2014 (NICE Decision Support Unit (University of Sheffield))

    Guidance on individual patient-level (microsimulation) cost-effectiveness modelling — when to use it in preference to cohort models, how to structure it, and how to handle the associated computational and uncertainty challenges.

Tools & Resources

1
  • Journal article

    flexsurv: a platform for parametric survival modeling in R — Jackson CH, Vol. 70, No. 8, pp. 1-33 ed., 2016 (Journal of Statistical Software)

    Journal article listed in the Sources of the HealthEconomics.wiki Concept Architecture article on Curve Fitting, where it is cited as a reference for that concept.

Frequently Asked Questions (6)

  • What is curve fitting?

    Curve fitting is estimating a mathematical function's parameters to match observed data, as when survival curves are fitted to trial data and extrapolated.

    Source: Latimer 2011

  • Why does curve fitting involve a choice among candidate functions?

    Curve fitting does not reveal a single true function; it selects, from a family of candidate mathematical forms, the one whose parameters best match the observed pattern. Because several forms may fit the visible data almost equally well yet diverge where data are sparse, fitting involves choosing among them rather than reading off one answer. This choice matters most in survival analysis, where different fitted curves can agree over the follow-up period but predict very different long-term survival. The candidates must be compared, not assumed. Latimer (2013) describes this.

    Source: Latimer 2013

  • How is curve fitting performed?

    Curve fitting is performed by selecting a candidate function or distribution, estimating its parameters from the data, often by maximum likelihood or least squares, and assessing how well the fitted curve matches the observations using goodness-of-fit measures and visual comparison. Several candidates may be fitted and compared. The result is a fitted curve with estimated parameters that represents the data pattern, chosen to balance fit against simplicity and, where relevant, the plausibility of any extrapolation beyond the observed range.

    Source: Collett 2015

  • How is curve fitting used in survival analysis?

    In survival analysis, curve fitting is used to fit parametric survival distributions, such as exponential, Weibull, or log-normal, to observed survival data, producing a smooth survival curve. This fitted curve describes the data and, importantly, can be extended beyond the observed follow-up to extrapolate long-term survival, which is needed to estimate mean survival for economic evaluation. Because different distributions can fit the observed data similarly yet extrapolate differently, curve fitting in survival analysis considers both the fit and the plausibility of the projection.

    Source: Latimer 2013

  • How is the best-fitting curve chosen?

    The best-fitting curve is chosen by comparing candidate functions on how well they match the data, using goodness-of-fit statistics such as information criteria and visual inspection of the fitted curve against the observations, and, where the curve will be extrapolated, on the plausibility of the projection beyond the data. Because closeness of fit within the data does not guarantee a sensible extrapolation, the choice balances statistical fit against clinical plausibility, so the selected curve both represents the data and projects credibly where required.

    Source: Latimer 2013

  • What are the limitations of curve fitting?

    Curve fitting is limited by the risk of overfitting, where a flexible function matches the data closely but generalises poorly, and by the fact that a good fit within the observed range does not ensure a valid extrapolation beyond it, since different well-fitting curves can diverge markedly outside the data. The choice of function embeds assumptions about the shape of the relationship. These limitations mean fitted curves are assessed for both fit and plausibility, and, for extrapolation, treated with attention to the uncertainty in the projected portion.

    Source: Collett 2015

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 20 Oct 2026

Content version: 1.0.2

Canonical Identity

Term code
HE-EM-SM-015

Stable URI · Machine-readable · Resolvable · CC BY 4.0