Tutorials › Generalized Linear Mixed Models (GLMM) › Modeling Hospital Readmissions Across Wards

Software and Case Studies · Tutorial 684 of 698

Modeling Hospital Readmissions Across Wards

Learn to document who was analyzed and explain ward-conditional readmission contrasts from a logistic GLMM in terms a hospital audience can interpret.

Intermediate 12 min read

What You'll Learn

  • Define an eligible patient-level analysis population for a 30-day readmission outcome.
  • Specify the conditional logistic random-intercept model for patients nested within wards.
  • Interpret adjusted predictor coefficients as conditional odds ratios.
  • Calculate and contextualize predicted probabilities and their differences across wards.
  • Identify diagnostics, assumptions, and limitations relevant to reporting ward comparisons.

Why the Analysis Population and Contrast Matter

A hospital audience needs to know two things before interpreting a readmission estimate: which discharges contributed data and what comparison the fitted model actually makes. A readmission rate calculated from all discharges can answer a different question from one restricted to eligible adult patients with complete 30-day outcome ascertainment. Likewise, a coefficient from a logistic mixed model is not automatically a difference in readmission probabilities. It is a conditional contrast on the log-odds scale.

The hypothetical case below models whether an eligible patient is readmitted within 30 days after discharge, with patients grouped in hospital wards. The goal is to describe adjusted associations and variation across wards—not to claim that a predictor or ward assignment caused readmission.

Define the Population and Model

Definition: Let \(Y_{ij}=1\) if patient \(i\) in ward \(j\) has an unplanned readmission within 30 days after the index discharge, and \(Y_{ij}=0\) otherwise. A logistic random-intercept model specifies $$ Y_{ij}\mid b_j,\mathbf{x}_{ij}\sim \operatorname{Bernoulli}(p_{ij}),\qquad \operatorname{logit}(p_{ij})=\beta_0+\mathbf{x}_{ij}^{\mathsf T}\boldsymbol{\beta}+b_j,\qquad b_j\sim N(0,\sigma_b^2). $$ Here \(\operatorname{logit}(p)=\log\{p/(1-p)\}\), \(\mathbf{x}_{ij}\) contains measured patient predictors, and \(b_j\) is the ward-specific random intercept. Conditional on the ward effects and included predictors, patient outcomes are assumed independent. The model also assumes the specified logit-linear predictor is adequate and that ward effects follow the stated normal distribution and are independent of the included predictors.

For an interpretable analysis, eligibility and outcome ascertainment must be specified before looking at model results. For example, an analysis might include adult, live, non-obstetric discharges from eight medical wards during a defined calendar period, identify one index discharge per patient, and count an unplanned readmission to the same hospital within 30 days. Planned admissions should not be counted as outcomes. If a patient can contribute more than one index discharge, the analysis must account for that additional dependence; a ward random intercept alone does not automatically handle repeated observations from the same patient.

Report the starting population, exclusions, final number analyzed, number of wards, and the reasons for missing outcomes or predictors. This is not a cosmetic detail: the fitted estimates describe the analyzed population under the specified model, not every patient who might use the hospital.

Worked Example: Documenting the Analysis Population

Suppose a hypothetical data extract contains 1,310 discharge records. Applying the prespecified eligibility rules removes 30 records that are not adult, live, non-obstetric discharges from one of the eight target wards. Among the remaining records, 20 lack 30-day outcome ascertainment and 10 have a missing value for a required predictor. Assume these exclusion counts are sequential and do not overlap.

The analyzed sample size is $$ 1310-30-20-10=1250\text{ patient discharges}. $$ Thus, 1,280 records remain after eligibility restrictions; 1,260 have an ascertained outcome; and 1,250 have complete data on the modeled predictors. The analysis has 1,250 discharges across eight wards.

A concise population statement would be: “The analysis included 1,250 eligible adult, live, non-obstetric discharges from eight medical wards. We excluded 30 ineligible records, 20 without 30-day outcome ascertainment, and 10 with missing model predictors.” This statement is accurate only if the counts and exclusion sequence match the actual data. It does not establish that complete cases represent excluded patients; that requires considering why data are missing.

Read the Fitted Coefficients as Conditional Contrasts

Suppose age is entered in 10-year units above age 60, emergency admission is coded 1 versus 0, and prior admission is coded 1 versus 0. An illustrative fitted model has fixed-effect estimates \(\hat{\beta}_0=-2.00\), \(\hat{\beta}_{\text{age}}=0.25\), \(\hat{\beta}_{\text{emergency}}=0.50\), and \(\hat{\beta}_{\text{prior}}=0.65\). Its ward intercept \(b_j\) shifts the log odds for patients in ward \(j\).

For two otherwise identical patients in the same ward who differ only in emergency-admission status, the conditional log-odds contrast is \(\hat{\beta}_{\text{emergency}}\). Exponentiation gives the conditional odds ratio. This follows directly by writing the odds from the model and canceling terms common to both patients:

$$ \frac{\operatorname{odds}(Y=1\mid \text{emergency}=1,b_j,\mathbf{x}_{-E})} {\operatorname{odds}(Y=1\mid \text{emergency}=0,b_j,\mathbf{x}_{-E})} = \frac{\exp(\eta_0+\hat{\beta}_{\text{emergency}})} {\exp(\eta_0)} = \exp(\hat{\beta}_{\text{emergency}}). $$

Here \(\eta_0\) collects the intercept, other patient predictors, and the same ward effect. This cancellation justifies the conditional odds-ratio interpretation; it does not imply an equal probability difference for all patients. A probability contrast depends on the starting risk.

Worked Example: Interpreting an Emergency-Admission Coefficient

Suppose the estimate for emergency admission is \(0.50\), with standard error \(0.18\). The estimated conditional odds ratio, comparing otherwise similar emergency and non-emergency admissions in the same ward, is $$ \exp(0.50)=1.649. $$

A Wald statistic is \(z=0.50/0.18=2.778\), giving a two-sided p-value of approximately \(0.0055\) under the large-sample normal approximation. A 95% Wald interval on the log-odds scale is $$ 0.50\pm1.96(0.18)=(0.1472,\ 0.8528). $$ Exponentiating the endpoints gives an odds-ratio interval of approximately \((1.159,\ 2.346)\).

In this hypothetical fit, emergency admission is associated with 1.65 times the conditional odds of readmission, at the same values of the other modeled predictors and within a ward; the 95% Wald interval is approximately 1.16 to 2.35. This is an odds comparison, not a claim that probability rises by 65%, and it does not establish a causal effect. The interval and p-value rely on the model and the Wald approximation.

Translate a Predictor Contrast into Probabilities

For a particular patient profile and ward effect, the fitted conditional probability is obtained by applying the inverse-logit function to the linear predictor:

$$ \hat{p}_{ij}=\frac{\exp(\hat{\eta}_{ij})}{1+\exp(\hat{\eta}_{ij})}, \qquad \hat{\eta}_{ij}=\hat{\beta}_0+\mathbf{x}_{ij}^{\mathsf T}\hat{\boldsymbol{\beta}}+\hat{b}_j. $$

Probability statements should specify the patient profile and whether ward effects are held fixed. Predictions using estimated ward effects are conditional, ward-specific predictions. They are different from population-averaged predictions that integrate over the distribution of ward effects.

Worked Example: Comparing Two Ward-Specific Predictions

Consider a patient aged 70, with a prior admission and no emergency admission. With age coded as one 10-year unit above 60, the fixed part of the linear predictor is $$ -2.00+0.25(1)+0.65(1)+0.50(0)=-1.10. $$ Suppose the estimated ward effects are \(\hat{b}_A=-0.67\) and \(\hat{b}_B=-0.05\). The corresponding linear predictors are \(\hat{\eta}_A=-1.770\) and \(\hat{\eta}_B=-1.150\).

The conditional predictions are approximately $$ \hat{p}_A=\frac{\exp(-1.770)}{1+\exp(-1.770)}=0.145541,\qquad \hat{p}_B=\frac{\exp(-1.150)}{1+\exp(-1.150)}=0.240489. $$

Using the unrounded probabilities, the difference for ward A minus ward B is \(0.145541-0.240489=-0.094948\), approximately \(-0.0949\), or a decrease of 9.49 percentage points. The comparison is for this specified profile and these estimated ward effects; it is not an overall difference in ward readmission rates. The corresponding conditional ward odds ratio for B versus A is \(\exp\{(-1.150)-(-1.770)\}=\exp(0.620)=1.859\). These point predictions do not, by themselves, express uncertainty in either the coefficients or ward effects.

Checks, Alternatives, and Limits

A fitted model should be assessed before its contrasts are communicated. Check that it converged without warnings and that estimates and standard errors are stable under reasonable fitting choices. Inspect the estimated ward variance and ward-level residual patterns; a near-zero variance may indicate little detectable ward heterogeneity, while an unstable estimate can arise when there are few wards or little information within wards. Examine observed and fitted readmission patterns across risk groups and wards, and look for influential wards, sparse outcome patterns, and signs of separation. A normal random-intercept distribution is an assumption, not a guarantee; a small number of wards makes its assessment especially difficult.

Also assess whether the chosen predictors and functional forms are credible. If the association with age is not adequately represented by a linear term on the log-odds scale, fitted risks may be systematically wrong. Missingness can change the analyzed population, and a complete-case analysis is not automatically unbiased. If ward assignment or ward characteristics are related to patient risk in ways not adequately represented by the model, the random-effects assumptions may be questionable. These concerns affect interpretation even when software reports a converged fit.

A logistic model with ward fixed indicators can estimate separate ward contrasts without assuming a normal distribution of ward effects, but it uses a different parameterization and can be unstable with sparse outcomes or many wards. A standard logistic regression without ward effects does not represent within-ward dependence. A population-averaged logistic model answers a different question by describing an average association rather than a ward-conditional one. Raw ward percentages are useful descriptive summaries, but they do not adjust for patient predictors and may be imprecise in small wards. The appropriate alternative depends on whether the hospital needs conditional comparisons, population-averaged associations, or transparent unadjusted summaries.

The random-intercept model assumes a common predictor effect across wards unless interactions or random slopes are included. It therefore does not establish that the emergency-admission association is identical in every ward, nor does it show why wards differ. The fitted ward effects are shrunken estimates, not rankings with certainty. Avoid presenting small numerical differences as meaningful performance gaps without uncertainty and appropriate context.

Common pitfall: “The coefficient is 0.50, so emergency admission increases readmission probability by 50 percentage points.” This is incorrect: \(0.50\) is a log-odds contrast, and \(\exp(0.50)=1.649\) is a conditional odds ratio. To report a probability difference, specify a patient profile and ward comparison, calculate both fitted probabilities, then subtract them using unrounded values.

Check Your Understanding

Use the hypothetical model and numbers in this tutorial. Solutions follow the questions.

  1. If 1,400 records are eligible and 25 lack outcome ascertainment while a further 15 have missing predictors, how many are analyzed when exclusions are sequential and nonoverlapping?
  2. What is the conditional odds ratio for a predictor with coefficient \(0.30\)?
  3. Why does the emergency-admission odds ratio not specify a single probability increase?
  4. What does a ward-specific prediction using an estimated ward effect condition on?

Solutions. (1) \(1400-25-15=1360\) records are analyzed. (2) The odds ratio is \(\exp(0.30)=1.350\), conditional on the other modeled predictors and the same ward. (3) The probability difference depends on the starting risk, which varies with patient predictors and the ward effect; the odds ratio alone does not determine one probability difference. (4) It conditions on the specified patient covariates and the estimated effect for that ward, rather than averaging over the ward-effect distribution.

Clinical Biostats