Concept Architecture
Generalized Linear Model for Health Care Costs, Counts and Trial Outcomes
A generalised linear model (GLM) is a regression in which a link function connects the expected value of an outcome to a weighted sum of covariates, and the outcome's variance is allowed to change with its mean according to a chosen distribution. Linear regression, logistic regression and Poisson regression are all special cases. In health economics the GLM is the usual regression for patient-level costs, which are non-negative, right skewed and more variable in high-cost patients, and for counts of resource use such as admissions. Its main attraction is that it estimates mean cost on the original currency scale, the scale on which budgets and incremental costs are judged. The same framework sits underneath the evidence synthesis models that the NICE Decision Support Unit sets out for trial outcomes.
Three components and how they fit together
Nelder and Wedderburn introduced the class in 1972, showing that iterative weighted linear regression gives maximum likelihood estimation of the parameters when observations follow an exponential family distribution and the systematic effects can be made linear by a suitable transformation. A GLM therefore has a distribution for the outcome, a linear predictor built from the covariates, and a link function joining the mean of the outcome to that predictor.
where is the outcome for patient , is its expected value given the covariates to , is the link function, is the linear predictor, to are the regression coefficients, is a dispersion parameter and is the power that ties the variance to the mean.
Jones, reviewing models for health care costs, lists the common power variance families. A Gaussian model has constant variance (), a Poisson model has variance proportional to the mean (), a gamma model has variance proportional to the square of the mean () and an inverse Gaussian model has variance proportional to its cube (). Distribution and link can be combined freely, although each distribution has a canonical link, and a Gaussian distribution with an identity link reproduces linear regression.
| Outcome in a health economic study | Usual distribution | Usual link | Coefficient reads as |
|---|---|---|---|
| Annual or episode cost per patient | Gamma | Log | Log of a ratio of mean costs |
| Count of admissions or visits | Poisson or negative binomial | Log | Log of a ratio of mean counts |
| Event or response in a trial arm | Binomial | Logit | Log odds ratio |
| Continuous score with constant spread | Gaussian | Identity | Difference in means |
Estimation needs only the mean and variance functions. Jones notes that GLM estimators are consistent as long as the mean function is correct, even if the variance function is wrong, so a misspecified variance costs precision, and sandwich estimator standard errors protect inference.
Why patient-level costs are modelled this way
Cost data have a spike at zero, a heavy right tail and a mean well above the median, because a minority of patients with complications attract very costly care. The error variance usually rises with expected cost, which least squares on the raw scale handles poorly, and a linear model on raw costs can also predict negative costs. The page on skewness covers how this asymmetry is measured.
The older remedy was least squares on log costs. Jones explains that its predictions are on the log scale and that exponentiating them does not give mean costs, so a smearing factor is needed, which he reports typically lies between 1.5 and 4.0 for health care costs. If the log-scale error is heteroskedastic, a single smearing factor is itself biased.
A GLM avoids that step because predictions are made on the raw cost scale and heteroskedasticity is handled through the choice of family. Barber and Thompson, applying GLMs to cost data from two randomised trials, concluded that GLMs make inferences about mean cost directly, and in both examples the Gaussian model fitted poorly. Mihaylova and colleagues, reviewing methods for healthcare resource use and costs, note gamma specifications for costs and Poisson or negative binomial specifications for resource use. They caution that, unless the identity link is used, a back transformation issue remains and can cost substantial precision.
Choosing the link and the variance function
The link decides how covariates act on mean cost. Barber and Thompson contrast an identity link, giving additive effects in pounds, with a log link, giving multiplicative effects, and report that the data may discriminate between them. Jones identifies the log link with a gamma distribution as the most popular specification for health care costs.
Jones describes the checks used to choose. The Pregibon link test and residual plots examine the link, and a modified Hosmer and Lemeshow test compares mean prediction errors across deciles of fitted cost. For the variance function the modified Park test fits a GLM with a log link to the squared raw-scale residuals, with the log of fitted values as the covariate.
where is the fitted mean cost for patient , is a constant and the estimated slope points to the family, near 2 for the gamma, near 1 for the Poisson and near 3 for the inverse Gaussian.
No specification wins everywhere. Manning and Mullahy, comparing log-scale estimators by simulation, found that no single alternative was best under all conditions and set out an algorithm for choosing, adding that a less appropriate estimator can lose much precision even when consistent. Mihaylova and colleagues summarise that the log-link GLM loses efficiency when the log-scale error variance is large or the log-scale error is symmetric but heavy tailed.
Two extensions relax the fixed choices. The generalized gamma model, as used by Manning, Basu and Mullahy, nests least squares on log costs, the gamma and the Weibull, so it allows a test between them. The extended estimating equations of Basu and Rathouz estimate the link and variance functions alongside the coefficients, an approach that Mihaylova and colleagues report is not recommended for samples smaller than 5,000, which would rule out most trials.
Zero costs and the two-part model
A gamma model cannot take zero values, and many cost datasets include patients with no costs. Mihaylova and colleagues describe the usual answer, a logit or probit model for the probability of any use followed by a second model, often a GLM, for mean cost among users. Blough, Madden and Hornbrook developed GLM extensions for this second part using maximum likelihood and quasi-likelihood. Mean cost per patient is the probability of any cost multiplied by the conditional mean. Deb and Norton, studying a US insurance expansion for young adults, found that a two-part or hurdle model, used instead of a single equation, revealed fewer emergency department visits and lower overall spending.
Worked example with a gamma log-link cost model
All numbers in this example are illustrative. A trial-based cost-effectiveness analysis compares a new care pathway () with usual care () for 12-month costs, adjusting for baseline high severity (). Every patient has a positive cost and a modified Park test gives a slope close to 2, so a gamma model with a log link is fitted.
where is the expected 12-month cost in GBP for patient , 7.601 is the log mean cost for a low-severity usual-care patient, is the pathway coefficient and 0.470 is the high-severity coefficient.
1. Convert the coefficients. The intercept gives exp(7.601), about GBP 2,000. The pathway coefficient gives a cost ratio of exp(−0.163) = 0.85, so mean cost is 15% lower at any severity, and exp(0.470) = 1.60 means high-severity patients cost 60% more.
2. Predict the four group means. Under usual care the means are GBP 2,000 for low severity and 2,000 × 1.6 = 3,200 for high severity. On the new pathway they are 2,000 × 0.85 = 1,700 and 3,200 × 0.85 = 2,720.
3. Average over the trial population. With 60% low and 40% high severity, usual care gives 0.6 × 2,000 + 0.4 × 3,200 = 2,480 and the new pathway gives 0.6 × 1,700 + 0.4 × 2,720 = 2,108.
4. Compute the adjusted incremental cost. The difference is 2,108 − 2,480 = −372, a saving of GBP 372 per patient, and 2,108 / 2,480 = 0.85 matches step 1. This averaged difference enters the cost-effectiveness ratio or net benefit, and its uncertainty is usually found by bootstrapping the fitting and prediction together.
5. Read the subgroup savings. Low-severity patients save 2,000 − 1,700 = 300 and high-severity patients 3,200 − 2,720 = 480, and 0.6 × 300 + 0.4 × 480 = 372. An identity-link model would force one saving in pounds for both groups, so the link choice changes subgroup results even when the average agrees.
6. Compare a naive log-scale analysis. If the same costs were log-normal with constant variance 0.64 on the log scale, least squares on log costs would give an intercept near 7.601 − 0.64 / 2 = 7.281, and exponentiating it gives about GBP 1,452, a median. The mean needs the factor exp(0.32) = 1.377, and 1,452 × 1.377 = 2,000, so the naive figure would understate mean cost by about 27%.
GLMs in pairwise and network meta-analysis
NICE DSU Technical Support Document 2 sets out a GLM framework for synthesising randomised trial data in pairwise meta-analysis and network meta-analysis. The meta-analysis structure stays the same while the likelihood and link change with the outcome, covering Normal, binomial, Poisson and multinomial likelihoods with identity, logit, log, complementary log-log and probit links. The familiar logistic model for binomial data is a GLM with a logit link, and for events with different follow-up times the complementary log-log link gives log hazard ratios, assuming constant hazards over follow-up. The document notes that the framework works in frequentist or Bayesian settings and takes a Bayesian approach with Markov chain Monte Carlo, which supports probabilistic decision making.
Neighbouring methods and where each applies
Several related methods are best seen as departures from the basic GLM. Weighted least squares is the step repeated inside the iterative fitting algorithm. Negative binomial regression handles counts whose variance exceeds the Poisson mean. Generalized estimating equations keep the GLM mean and variance functions but allow correlation within clusters, such as repeated costs per patient, while a mixed-effects model adds random effects to the linear predictor. Jones notes that costs over a whole episode or lifetime raise right censoring, which a standard GLM for complete costs does not address. The gamma distribution page covers the distribution itself, whereas a GLM uses only its mean-variance relationship.
Common misreadings and limits
Most errors with GLMs in cost analysis come from treating coefficients as answers. The decision quantity is a mean on the cost scale for the relevant population.
- Reading a log-link coefficient as pounds. A coefficient of −0.163 is a 15% reduction in mean cost, and the saving in pounds depends on patient mix, as steps 3 to 5 show.
- Treating gamma with a log link as a default. Manning and Mullahy found no estimator best in all conditions, so link and variance checks belong in every analysis.
- Fitting a continuous distribution to many zeros. A two-part model separates any use from the amount spent.
- Reporting coefficients without the averaged effect. Basu and Rathouz define the marginal effect as the derivative of the mean function averaged over the covariate distribution.
- Overlooking sample size and assumptions. Mihaylova and colleagues note that complex GLMs and checks of parametric assumptions need large samples, that frequentist GLM inference involves approximation, and that sensitivity to the assumed distribution should be checked.
Sources
- Barber J, Thompson S. Multiple regression of cost data: use of generalised linear models. Journal of Health Services Research and Policy. 2004;9(4):197-204. https://doi.org/10.1258/1355819042250249
- Basu A, Rathouz PJ. Estimating marginal and incremental effects on health outcomes using flexible link and variance function models. Biostatistics. 2005;6(1):93-109. https://doi.org/10.1093/biostatistics/kxh020
- Blough DK, Madden CW, Hornbrook MC. Modeling risk using generalized linear models. Journal of Health Economics. 1999;18(2):153-171. https://doi.org/10.1016/s0167-6296(98)00032-0
- Deb P, Norton EC. Modeling health care expenditures and use. Annual Review of Public Health. 2018;39:489-505. https://doi.org/10.1146/annurev-publhealth-040617-013517
- Dias S, Welton NJ, Sutton AJ, Ades AE. NICE DSU Technical Support Document 2: A generalised linear modelling framework for pairwise and network meta-analysis of randomised controlled trials. Decision Support Unit; August 2011, last updated September 2016. https://www.sheffield.ac.uk/sites/default/files/2022-02/TSD2-General-meta-analysis-corrected-2Sep2016v2.pdf
- Jones AM. Models for health care. HEDG Working Paper 10/01. University of York; January 2010. https://www.york.ac.uk/media/economics/documents/herc/wp/10_01.pdf
- Manning WG, Basu A, Mullahy J. Generalized modeling approaches to risk adjustment of skewed outcomes data. Journal of Health Economics. 2005;24(3):465-488. https://doi.org/10.1016/j.jhealeco.2004.09.011
- Manning WG, Mullahy J. Estimating log models: to transform or not to transform? Journal of Health Economics. 2001;20(4):461-494. https://doi.org/10.1016/s0167-6296(01)00086-8
- Mihaylova B, Briggs A, O'Hagan A, Thompson SG. Review of statistical methods for analysing healthcare resources and costs. Health Economics. 2011;20(8):897-916. https://doi.org/10.1002/hec.1653
- Nelder JA, Wedderburn RWM. Generalized linear models. Journal of the Royal Statistical Society, Series A. 1972;135(3):370-384. https://doi.org/10.2307/2344614
Related Concepts (3)
Library
Publications
1
Statistical Analysis of Cost-Effectiveness Data — Willan & Briggs, 1st Edition ed., 2006 (John Wiley & Sons)
A synthesis of statistical methods for analysing cost-effectiveness data, including net-benefit regression, confidence intervals for the ICER, cost-effectiveness acceptability curves, and covariate adjustment. Part of the Wiley Statistics in Practice series.
BookView source →
Frequently Asked Questions (6)
What is a generalized linear model?
A generalised linear model (GLM) relates an outcome's mean to covariates via a link function, used in health economics for skewed costs and counts.
Source: Nelder & Wedderburn 1972
How does a generalized linear model extend ordinary regression?
Ordinary linear regression treats the outcome as normal, with its mean equal to a weighted sum of covariates and a constant variance. A generalised linear model relaxes both assumptions. A link function joins the expected value of the outcome to the weighted sum, and the outcome may follow any exponential family distribution, so its variance can change with its mean. Nelder and Wedderburn showed in 1972 that iterative weighted linear regression gives maximum likelihood estimates for the whole class, which put many familiar regressions under one fitting method.
Source: Nelder & Wedderburn 1972
How does a generalized linear model work?
Two structural choices define a generalised linear model. The mean function links the linear predictor to the expected outcome, and the variance function ties the variance on the original scale to that mean, for example rising with the square of the mean in a gamma model for costs. The parameters are then estimated given these two assumptions, so the outcome itself is never transformed. Mihaylova and colleagues report that a misspecified variance function can make the estimates inefficient, while the mean function estimates usually stay robust. The same review cites Blough and colleagues for the general theory behind this estimation.
Source: Mihaylova et al. 2011
What are examples of generalized linear models?
Linear regression is the simplest example, a generalised linear model with a normal distribution and an identity link. Logistic regression pairs a binomial distribution with a logit link for yes or no outcomes, and Poisson regression pairs a Poisson distribution with a log link for counts such as hospital admissions. In health care cost analysis the usual example is a gamma model with a log link, whose coefficients are logs of ratios of mean costs. Nelder and Wedderburn illustrated the class in 1972 with examples for the Normal, binomial, Poisson and gamma distributions.
Source: Nelder & Wedderburn 1972
What is the role of the link function in a generalized linear model?
In a generalised linear model, covariates reach the mean of the outcome only through the link, the transformation that sets the expected value equal to a weighted sum of covariates. An identity link gives additive effects, such as one fixed saving in pounds for every patient. A log link gives multiplicative effects, so a coefficient of -0.163 means mean cost about 15% lower in every subgroup, and the saving in pounds then varies with patient mix. Mihaylova and colleagues caution that, unless the identity link is used, a back transformation issue remains and can lead to a substantial loss of precision.
Source: Mihaylova et al. 2011
Why are generalized linear models useful?
Health care costs are non-negative, right skewed and more variable among high-cost patients, a pattern that least squares on raw costs handles poorly. A generalised linear model specifies the mean and variance on the original cost scale, so it can absorb this rising spread without a log transformation of costs. The same framework models resource use with Poisson or negative binomial specifications, and it often forms the second part of a two-part model when some patients have no costs. Mihaylova and colleagues, reviewing methods for healthcare resources and costs, describe the approach as accommodating skewness through variance weighting.
Source: Mihaylova et al. 2011
Trust Record
Verified by Dr Darrin Baines
British health economist
Professional identity: darrinbaines.org
Verification date: 26 Oct 2026
Content version: 1.0.1
Canonical Identity
- Term code
- HE-ES-SA-071
- Wikidata
- Q1501882
Stable URI · Machine-readable · Resolvable · CC BY 4.0
