The NIST website's description of the partial residual plot says that it plots
$$ \text{Res}+\hat\beta_iX_i\text{ versus } X_i $$
where
- $\text{Res}$ = residuals from the full model
- $\hat\beta_i$ = regression coefficient of $X_i$
- $X_i$ = the $i$th independent variable in the full model
This decription is clear enough when the full model is of the form
$$ Y=\beta_0+\beta_1X_1+\beta_2X_2+\cdots+\beta_iX_i+\cdots $$
However, consider the following full models which include interaction effects:
$$ (1)\qquad\qquad Y=\beta_0+\beta_1X_1+\cdots+\beta_iX_i+\cdots+\beta_kX_i^2+\cdots $$ $$ (2)\qquad\qquad Y=\beta_0+\beta_1X_1+\cdots+\beta_iX_i+\cdots+\beta_kX_iX_j+\cdots $$ $$ (3)\qquad\qquad Y=\beta_0+\beta_1X_1+\cdots+\beta_iX_i+\cdots+\beta_kX_iD+\cdots $$
where $D$ is a categorical dummy variable (i.e. it takes the values 0 or 1) in the second model. Would the partial residual plot in both cases neglect the $\beta_k$ (i.e. interaction part) or would you plot (these are my own suggestions):
$$ (1)\qquad\qquad \text{Res}+\hat\beta_iX_i+\hat\beta_kX_i^2\text{ versus }X_i $$ $$ (2)\qquad\qquad \text{Res}+\hat\beta_iX_i+\hat\beta_kX_iX_j\text{ versus }X_i $$ $$ (3)\qquad\qquad \text{Res}+\hat\beta_iX_i+\hat\beta_kX_iD\text{ versus }X_i $$
(1) makes sense to me, but (2) and (3) do not - since what would you take as the values of $X_j$ and $D$ in the plot? The values that correspond to the $X_i$ in the data set?
As far as I know, partial residual plots in R do not even support interaction terms. So I'd like someone to confirm how cases (1), (2) and (3) should be properly handled for a partial residual plot.