Day 39 of 55Stage 4 · ImproveThursdayMultiple regression

Two causes at once

Capacity explains three quarters of the waits. Amara adds urgent use of routine slots to the model, to see how far the two together could take the clinic.

Stage goal: Test and put in place solutions that remove the root causes.
Team
Astrid (Data Analyst)
Stakeholders
Atticus (Director of Community Health)
How the day goes
  1. 09:00Fit the model with Astrid (Data Analyst)
  2. 11:00Try scenarios
  3. 15:00Share with Atticus (Sponsor)

Situation 1 of 2

09:00 · Fit the model with Astrid (Data Analyst)
Astrid (Data Analyst)
With both inputs, R² goes from 0.75 to 0.92. Shall we add the Monday share and missed appointments too?

How many inputs should the model have?

In multiple regression, add only inputs that are significant and justified; watch adjusted R², not R².

Situation 2 of 2

15:00 · Share with Atticus (Sponsor)
Atticus (Director of Community Health)sponsor
So if we got back to 270 slots and cut urgent use to 5%, what happens?

How do you answer?

Use a model for scenarios inside the range of its data, and always give the prediction interval.
Worked example 1

Two causes at once

Astrid (Data Analyst) fits one model with both routine slots offered and urgent use of routine slots, for the same 20 weeks.

WeekRoutine slots offeredUrgent use of routine slots (%)Median wait (days)
Week 1259118
Week 2261139
Week 3270158
Week 4265117
Week 5254149
Week 6262108
Week 7259149
Week 8263128
Week 9254118
Week 10263129
Week 11263128
Week 122401210
Week 13234810
Week 142351411
Week 152251011
Week 162431812
Week 172221312
Week 182381613
Week 192301212
Week 202281513
Download the data (spreadsheet file)
  1. Modelwait = b0 + b1 × slots + b2 × urgent %
  2. Fitted equationwait = 30.94 − 0.1025 × slots + 0.339 × urgent %
  3. Slots−0.1025 days per slot; t = −12.6= p below 0.0001
  4. Urgent use+0.34 days per percentage point; t = 6.2= p below 0.0001
  5. FitR² 0.924, adjusted R² 0.915 (allows for the extra term)= up from 0.75
  6. Typical errorstandard deviation of the residuals= 0.55 days
  7. Scenario: 262 slots, 6% urgent30.94 − 0.1025 × 262 + 0.339 × 6; prediction interval ±1.43= 6.1 days
  8. Scenario: 270 slots, 5% urgentprediction interval ±1.52= 4.9 days
What it meansTogether the two causes explain 92% of the variation in weekly waits. Restoring capacity and protecting routine slots from urgent use could bring the weekly median to about 5 days.
What Amara decidesSolutions must do both: restore and add routine capacity, and give urgent cases their own slots. The Monday peak and missed appointments add more.
Try it yourself in a spreadsheet
Fit=LINEST(D2:D21,B2:C21,TRUE,TRUE) (two input columns together)
OrData, Data Analysis, Regression, with B and C as the inputs
Prediction=INTERCEPT + slope1 × 270 + slope2 × 5, using the LINEST results

Adjusted R² went from 0.75 (one input) to 0.915 (two). Why look at adjusted R² rather than R²?

Show the answer

R² always rises when you add an input, even a useless one. Adjusted R² only rises if the new input explains more than chance would.

Key concepts

The ideas behind today. Concept how the work is done, in our own words · Common practice widely used ways of working.

Concept

Several inputs

  • Multiple regression estimates each input's effect while holding the others constant: y = b0 + b1 × x1 + b2 × x2.

Where you will meet this: Multiple linear regression

Concept

Adjusted R²

  • R² always rises when an input is added. Adjusted R² only rises if the input explains more than chance would, so it's the fairer comparison.
Common practice

Keep models lean

  • Use inputs with a proven or likely cause, about 10 data points for each, and avoid inputs that measure the same thing.

Explained in our own words. This helps you understand the concepts behind the certifications; it does not reproduce or replace any official guide. Sources

Day 39 complete

2 situations today.

Your responsibility todayModelling several causes
Technique you usedMultiple regression, adjusted R²
Key points to remember
  • In multiple regression, add only inputs that are significant and justified; watch adjusted R², not R².
  • Use a model for scenarios inside the range of its data, and always give the prediction interval.