City University of Hong Kong · FACULTY OF STATISTICS

DSC6008 Chap.4 Regression Models and Coded Predictors

- one subject, every graph, every model, every mark
6 Chapters4-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 4 of 10 · DSC6008

Regression Models and Coded Predictors

Read coefficients through the design

A regression model describes the conditional mean of a response. The intercept is the expected response at the model's reference settings, and a slope is the expected change for a one-unit predictor increase while other included predictors remain fixed.

That conditional wording prevents a coefficient from being mistaken for an unqualified causal effect.

Keep units attached to the fitted equation

A slope carries response units per predictor unit. If output is recorded in hundreds of items and temperature in degrees, a slope of 0.35 means 35 items per degree, not 0.35 percent.

The intercept uses response units and applies at predictor zero, which may lie outside the observed range. Centring a predictor can move the baseline to a meaningful setting without changing fitted values.

Separate fit from scientific support

Least squares chooses coefficients that minimize squared vertical residuals.

R-squared compares residual variation with an intercept-only baseline, but a high value does not prove linearity, causation or useful extrapolation.

The design determines whether a treatment coefficient can be causal, while the observed predictor range determines where the fitted relation is supported.

Make categories and reference levels visible

Indicator coding compares each represented category with a named reference level. Changing the reference changes coefficient labels and values, but it does not change the fitted mean for any category.

A valid interpretation identifies both groups, states the conditional difference and holds the other model terms fixed. Without the baseline, the sign of a coded coefficient has no stable comparison.

Recover interactions through fitted means

An interaction allows the effect of one predictor to depend on another.

Rather than interpreting the product coefficient alone, calculate fitted means at combinations inside the data range. Subtract treatments at fixed predictor settings and compare those contrasts. If their directions differ, an average main effect can conceal a crossover that is central to the practical decision.

Use residuals to challenge the model

A residual is an observed response minus its fitted mean.

Curvature against fitted values suggests the mean function is incomplete, while a funnel shape suggests changing variance. A run-order pattern can reveal drift or dependence, and a normal Q-Q plot examines tail shape for reference-based inference.

Each plot should lead to a named consequence or model revision.

Translate output into a defensible claim

Calculate one or two fitted values by hand before trusting a table. Report the coefficient or contrast with units and uncertainty, state the comparison range, and explain what design feature supports the interpretation.

Predictions beyond that range are extrapolations even when software returns them without warning. The closing sentence should return to the experimental question rather than to the function call.

In this chapter

What this chapter covers

  • 01

    Linear models

  • 02

    Least squares

  • 03

    Coefficient units

  • 04

    Indicator variables

  • 05

    Interactions

  • 06

    Residual checks

Worked example · free

Interpret a coded treatment coefficient

Q [5 marks]. AskSia-authored practice. These five marks are not a University mark allocation. A fitted model is yield = 42 + 3.5T - 0.8M, where T is 1 for the new treatment and 0 for control, and M is moisture percentage. Interpret 3.5.
Residuals are vertical differences between observations and fitted means.Residuals are vertical differences between observations and fitted means. Least squares selects coefficients that minimise the sum of their squared lengths, so large misses receive extra weight.Least squares chooses the line with the smallest squared vertical gapspredictor xresponse yfitted meanresidual
Residuals are vertical differences between observations and fitted means. Least squares selects coefficients that minimise the sum of their squared lengths, so large misses receive extra weight.
  • 1Identify control as the reference category.
  • 2Hold moisture fixed because it also appears in the model.
  • 2State the expected yield difference with units.
At the same moisture percentage, the fitted mean yield for the new treatment is 3.5 yield units higher than for control. The coefficient is an adjusted association in this model; a causal interpretation additionally depends on how treatment was assigned.
Sia tip — Every coefficient sentence needs a comparison, a unit and the variables held fixed.
Glossary

Key terms

Least Squares
The fitting rule that minimizes the sum of squared residuals.
Indicator Variable
A numeric code that represents category membership relative to a reference level.
Interaction Term
A model term allowing one predictor effect to depend on another predictor.
FAQ

Regression Models and Coded Predictors FAQ

What does a regression intercept mean?

It is the fitted mean response when numeric predictors equal zero and categorical predictors are at their reference levels. That setting may or may not be scientifically realistic. If zero lies outside the useful range, centring a predictor can give the intercept a clearer interpretation.

Can a regression coefficient be called causal?

Only when the design and assumptions support that claim. A randomized treatment coefficient can have a causal interpretation under appropriate implementation and analysis. In observational data, conditioning on measured predictors does not by itself remove unmeasured confounding or establish a causal effect.

Why include an interaction?

An interaction is appropriate when the effect of one predictor changes across levels of another. Without it, the model forces a common slope or treatment difference. Interpretation then uses combined coefficients, because no single main-effect coefficient describes every setting.

Study strategy

Assessment move

Annotate every formula with units and reference categories before fitting it. Predict the sign of each coefficient from the design, calculate at least two fitted means by hand and inspect their difference. Then read residual plots against the assumptions required for the planned interval or test.

Working through Regression Models and Coded Predictors in DSC6008? Sia is AskSia’s AI Statistics tutor — ask any DSC6008 Regression Models and Coded Predictors question and get a clear, step-by-step explanation grounded in how DSC6008 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 22 of your City University of Hong Kong subjects - and 1,000+ Bibles across every Australian university.
Sia - your DSC6008 tutor, unlimited, worked the way the exam marks it
The full 4-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works