| Y | X | Z1 | Z2 |
|---|---|---|---|
| 10 | 2 | 5 | 1 |
| 12 | 3 | 6 | 2 |
| 13 | 4 | 6 | 3 |
| 15 | 5 | 7 | 3 |
| 18 | 6 | 8 | 4 |
A partial regression plot visualizes the adjusted relationship between Y and a focal predictor X after removing the linear effects of controls Z.
- Residuals from control regressions: rY = Y − Ŷ(Z) and rX = X − X̂(Z).
- Partial regression through the origin: rY = b · rX + e, b = Σ(rX·rY) / Σ(rX²).
- Partial fit: R² = 1 − SSE/SYY, SSE = Σe², SYY = Σ(rY²).
- The slope b matches the coefficient of X in the full model Y ~ X + Z (same intercept option).
- Paste your CSV into the data box, or load the example.
- Choose your dependent variable (Y) and focal predictor (X).
- Select one or more control variables (Z) to adjust for.
- Pick intercept, missing handling, and standardization settings.
- Press Submit to view results, plot, and downloads.
What the calculator outputs
The calculator produces partial residual pairs rX|Z and rY|Z for every usable row. It also reports the partial slope b, partial R², residual correlation, standard error, t statistic, degrees of freedom, SSE, and MSE. These metrics describe the adjusted linear relationship between the focal predictor and the response after controls are removed.
Data requirements and cleaning
Inputs should be numeric columns in a consistent scale. When drop-missing is enabled, rows with non-numeric values in Y, X, or selected controls are removed and the dropped count is shown. When drop-missing is disabled, missing control values are imputed as zero to keep rows, which can change residual patterns and should be used cautiously.
Standardize option converts each selected column to z-scores (mean 0, standard deviation 1) before residualization, making axes comparable across units. In standardized mode, a one-unit change on rX|Z represents one standard deviation after accounting for controls. Compare runs by keeping the same standardization setting. When interpreting b, remember it reflects adjusted units; back-transform only if original-scale effects are needed. This helps communicate results when stakeholders expect unitless comparisons clearly.
Interpreting slope and partial fit
The partial slope is computed from residuals using b = Σ(rX·rY) / Σ(rX²) and matches the X coefficient from the full model Y ~ X + Z under the same intercept choice. A higher partial R² indicates that adjusted variation in Y is well explained by adjusted variation in X, while a low value suggests limited incremental contribution.
Plot diagnostics for influence
The scatter plot highlights adjusted outliers and leverage. Points far from the fitted line have large residuals and may represent unusual behavior after controlling for Z. A wide spread in rX|Z implies remaining variability in X; if rX|Z variance is near zero, X is largely explained by controls and the partial plot becomes unstable.
Export workflow and reporting
Use the CSV export to archive residual pairs, fitted values, and row order for later modeling or audit trails. The PDF export provides a compact summary of variables, controls, and key statistics plus a preview of residual pairs. For reproducibility, keep the same delimiter, intercept option, and control set across comparisons.
1) What is a partial regression plot used for?
It shows the relationship between Y and X after removing the linear effects of selected controls Z from both variables. This helps you interpret X’s incremental contribution in a multiple regression setting.
2) Why does the fitted line go through the origin?
Residuals from regressions on Z have mean near zero when an intercept is included, so the partial regression is fit without an intercept. This makes the slope directly comparable to the full-model coefficient for X.
3) What happens if X is highly explained by the controls?
If rX|Z has almost no variance, the slope becomes unstable and the calculator will warn you. Consider choosing a different focal predictor, reducing controls, or adding more observations with variation in X.
4) Should I standardize the data before running it?
Standardization is helpful when variables have different units and you want unitless comparisons. Keep the same standardization setting when comparing runs, because it changes the scale of residual axes and the slope’s units.
5) How are missing values handled?
With drop-missing enabled, any row with non-numeric Y, X, or selected controls is removed. With it disabled, missing controls are imputed as zero while Y and X must remain numeric, so interpret results carefully.
6) What do the downloads contain?
CSV includes residual pairs, fitted values, and residuals for each usable row plus key metrics. PDF provides a compact summary of variables, controls, and statistics with a short residual preview for quick sharing.