Regression Exam Workshop
Regression questions are usually interpretation questions disguised as algebra. Write the fitted equation, identify the reference case, and calculate the requested contrast. A coefficient is not automatically a causal effect; that conclusion comes from Randomized Assignment or an observational identification argument.
Worked problem 1: treatment-by-baseline interaction
A tutoring experiment randomizes students to a new program. Baseline score is centered at the sample mean, $X_c=X-70$, and the fitted model is
\[\widehat{Y}=72+5.4W+0.65X_c-0.20(WX_c).\]Tasks. Interpret every coefficient and estimate the treatment effect for baseline scores 60, 70, and 80.
For control students, $W=0$:
\[\widehat Y_0=72+0.65X_c.\]For treated students, $W=1$:
\[\widehat Y_1=77.4+(0.65-0.20)X_c.\]The conditional treatment effect is therefore
\[\widehat\tau(X_c)=\widehat Y_1-\widehat Y_0=5.4-0.20X_c.\]| Baseline score | $X_c$ | Estimated effect |
|---|---|---|
| 60 | -10 | 7.4 |
| 70 | 0 | 5.4 |
| 80 | 10 | 3.4 |
The intercept is the predicted control outcome for a student at the mean baseline score. The treatment coefficient is the effect at that same baseline score. The interaction says the estimated benefit falls by 0.20 points for each additional baseline point. Because $X_c$ has sample mean zero, $5.4$ is also the sample-average fitted treatment contrast in this centered specification.
Worked problem 2: coefficient test and model fit
In a regression of weekly study hours on a randomized planning prompt and baseline covariates, $\hat\beta_W=1.35$ with $SE(\hat\beta_W)=0.52$. The residual sum of squares is 840 and the total sum of squares is 1,200.
For $H_0:\beta_W=0$,
\[t=\frac{1.35}{0.52}=2.60.\]A 95% large-sample interval is approximately
\[1.35\pm1.96(0.52)=(0.33,2.37).\]Model fit is
\[R^2=1-\frac{840}{1200}=0.30.\]The model explains 30% of the sample variation in study hours. That figure is not the proportion of outcomes caused by treatment, and a low $R^2$ would not invalidate randomization-based identification of the treatment effect.
Worked problem 3: odds ratio versus risk difference
A logistic model for an adverse event is
\[\log\frac{p}{1-p}=-2.20+0.47W.\]The treatment odds ratio is
\[e^{0.47}=1.60.\]For controls,
\[p_0=\frac{1}{1+e^{2.20}}=0.100.\]For treated units,
\[p_1=\frac{1}{1+e^{1.73}}=0.150.\]Thus the fitted risk difference is about 5 percentage points even though the odds rise by 60%. Odds ratios and risk ratios are not interchangeable. The coefficient is constant on the log-odds scale, while the probability change depends on the starting risk.
Exercises
- Given $\widehat Y=40+3W+2X+1.5WX$, calculate both group-specific lines and the treatment effect at $X=-1,0,2$. Identify the reference group.
- An OLS slope is $-0.84$ with standard error $0.31$ in a model with 42 residual degrees of freedom. Test a two-sided zero null and construct a 90% confidence interval.
- For $Y=X\beta+\varepsilon$, explain what fails when $X^\top X$ is singular. Give one experimental-design example that creates exact collinearity.
- A logistic treatment coefficient is $-0.69$. Calculate the odds ratio. Then show why the corresponding risk difference cannot be found without an intercept and covariate values.
- Compare the coefficient on $W$ in an unadjusted treatment regression with the coefficient after adding centered pretreatment covariates. State what randomization guarantees and what adjustment may improve.
Solution checks
- $\widehat Y_0=40+2X$, $\widehat Y_1=43+3.5X$, and $\widehat\tau(X)=3+1.5X$, giving effects $1.5$, $3$, and $6$.
- $t=-2.71$. Use $t^*_{0.05,42}$ for the 90% interval.
- The inverse does not exist and coefficients are not uniquely identified; including an intercept and indicators for every treatment category is one example.
- $e^{-0.69}\approx0.50$; a probability contrast depends on baseline log-odds.
- Both target a treatment contrast under randomization. Good covariate adjustment can improve precision; it does not create randomization.