Exercise: Translate coefficients back into scientific units

Exercise: Translate coefficients back into scientific units#

An analyst switches a stimulus measure from milliseconds to seconds and reports a dramatically larger effect. Determine what changed in the model and what did not.

See the shared submission guidance and rubric. Run from book/exercises; the setup below supplies data, not completed answers.

# Shared simulator and small utility functions; no live service is called.
source("../R/course.R")
set.seed(110)
d <- data.frame(exposure_ms=runif(100,100,900), condition=rep(c("control","cue"),50))
d$condition <- factor(d$condition, levels=c("control","cue"))
d$rt <- 700 - .12*d$exposure_ms - 25*(d$condition=="cue") + rnorm(100,0,35)
d$exposure_s <- d$exposure_ms/1000

1. Interpret an additive model#

Fit RT from exposure_ms and condition. Give each coefficient’s units and a sentence interpreting it. Explain whether exposure=0 lies within the observed range and why that matters for the intercept. Calculate predictions for both conditions at 500 ms.

# Fit the additive model and predict the two specified cases.

Your explanation and evidence:

2. Change units and reference points#

Refit using seconds, then using exposure centered at 500 ms. Compare slopes, intercepts, fitted values, and residuals with numerical tolerances. Explain the different numerical slopes without describing a stronger scientific effect.

# Refit and verify prediction equivalence across parameterizations.

Your explanation and evidence:

3. Ask whether slopes differ#

Fit an exposure-by-condition interaction. Plot condition-specific lines and estimate their slope difference with an interval. The generator has no interaction: explain why a nonzero fitted interaction is still possible and why its sign alone is weak evidence.

# Fit and visualize the interaction without selecting on its p-value.

Your explanation and evidence:

What to submit#

A coefficient translation table, equivalent predictions under three parameterizations, and an interaction plot with a qualified interpretation.