Fitting and breaking models

Research Skills — Week 8 Application

Today’s plan

  • Brief guided example
  • Group work
  • Extrapolation exercise
  • Discussion
  • Wrap-up

Two parts

Part Time What
Regression 45 min Apply lm() to your project (if relevant)
Extrapolation 25 min A structured exercise everyone does

Questions?

Submit questions:

PollEv.com/geol

text geol to 07480 781235

Brief guided example

  • Today’s plan

🎓💻 Quick demo

  • Group work
  • Extrapolation exercise
  • Discussion
  • Wrap-up

Regression workflow

  1. Fit lm(y ~ x, data = df)
  2. summary() — coefficients, R²
  3. plot(model) — diagnostics
  4. Interpret: slope, R², residual patterns

Group work

  • Today’s plan
  • Brief guided example

✏️💻 Regression on your data

  • Extrapolation exercise
  • Discussion
  • Wrap-up

Your analysis

Groups with a regression question: fit and diagnose.

Groups with t-test/ANOVA: refine existing analyses — add effect sizes, improve figures, document assumptions.

All groups: write a Methods and Results section draft.

Extrapolation exercise

  • Today’s plan
  • Brief guided example
  • Group work

✏️💻 Breaking a model

  • Discussion
  • Wrap-up

UK renewable energy: 2010–2025

Everyone does this exercise, regardless of project topic.

The WebR page has scaffolded exercises:

  1. Fit a linear model to the renewable trend. Plot it.
  2. Extrapolate to 2040. What does it predict?
  3. Fit an exponential model. Extrapolate to 2040.
  4. Which is better? Is either plausible?
  5. What is the model not capturing?

Attendance

Discussion

  • Today’s plan
  • Brief guided example
  • Group work
  • Extrapolation exercise

💬 What did you find?

  • Wrap-up

The extrapolation lesson

  • Both models fit the data well in-sample
  • Both produce absurd predictions out-of-sample
  • In-sample quality tells you nothing about out-of-sample quality

“What is the model not capturing?”

The question that separates a good analyst from HolmesCo.

Your project

“In our project, the biggest thing our analysis might be missing is…”

Wrap-up

  • Today’s plan
  • Brief guided example
  • Group work
  • Extrapolation exercise
  • Discussion

Any questions we missed?

Submit questions:

PollEv.com/geol

text geol to 07480 781235

Commit your work

Commit all analysis code and results.

Your analysis is now nearly complete.

Next two weeks: refine, write up, and have it reviewed.