UK-based online statistics and data analysis support for USA, UK, and international clients. No exams, no impersonation, no fabricated data.
Correlation Tests

Semi Partial Correlation: Formula, Interpretation, Python, R, SPSS and Excel Guide

Part correlation, unique variance, R-squared change, residualized predictor and regression interpretation Semi Partial Correlation: Formula, Interpretation, Python, R, SPSS and Excel Guide Semi Partial Correlation, also...

Statistics guide Ethical learning support SPSS/R/Python/Excel friendly
Semi Partial Correlation: Formula, Interpretation, Python, R, SPSS and Excel Guide

Part correlation, unique variance, R-squared change, residualized predictor and regression interpretation

Semi Partial Correlation: Formula, Interpretation, Python, R, SPSS and Excel Guide

Semi Partial Correlation, also called semipartial correlation or part correlation, measures the unique relationship between an outcome and the part of one predictor that is not explained by other control variables. In this worked example, the outcome is G3 final grade, the focal predictor is G2, and the controls are G1, studytime, failures and absences. The result shows that G2 makes a large and statistically significant unique contribution to G3 after the controls are already in the model.

AdvertisementGoogle AdSense top placement reserved here

Quick Answer: Semi Partial Correlation Result

The main analysis tested whether G2 uniquely predicts G3 after controlling for G1, studytime, failures and absences. The dataset contains 649 complete cases. Before controls, the zero-order correlation between G2 and G3 is r = 0.918548, which is a very strong positive relationship.

After removing from G2 the part explained by the controls, the semi-partial correlation between G3 and the residualized part of G2 is sr = 0.397992. The squared semi-partial correlation is sr² = 0.158397. This means that G2 uniquely explains about 15.84% additional variance in G3 after G1, studytime, failures and absences are already included.

Outcome variableG3
Focal predictorG2
Complete cases649
Controls4

Zero-order r0.9185
Partial r0.7173
Semi-partial sr0.3980
sr² / ΔR²0.1584

Reduced R²0.6922
Full R²0.8506
F change681.56
p-value< .001

Final interpretation: G2 makes a statistically significant unique contribution to G3 after controlling G1, studytime, failures and absences, sr = 0.398, sr² = 0.158, F change = 681.557, p < .001. The unique effect is practically meaningful because the added predictor increases R² from 0.6922 to 0.8506.

Important distinction: Partial correlation and semi-partial correlation are not the same. Partial correlation residualizes both the outcome and the focal predictor. Semi-partial correlation residualizes only the focal predictor. That is why semi-partial sr² directly equals the R² change when the focal predictor is added last in hierarchical regression.

Table of Contents

  1. What Is Semi Partial Correlation?
  2. Why Use Semi Partial Correlation?
  3. Semi Partial vs Partial Correlation
  4. Semi Partial Correlation Formula
  5. Null and Alternative Hypotheses
  6. Dataset and Variables Used
  7. Verified Semi Partial Correlation Results
  8. Reduced Model vs Full Model
  9. Full Model Coefficients
  10. Python Chart-by-Chart Interpretation
  11. R Chart-by-Chart Interpretation
  12. SPSS Output and Workflow Interpretation
  13. Excel Worked File Explanation
  14. Python, R, SPSS and Excel Workflows
  15. Code Blocks and Excel Formulas
  16. Assumptions and Diagnostics
  17. How to Report Semi Partial Correlation
  18. Common Mistakes
  19. Downloads and Resources
  20. Related Statistical Guides
  21. FAQs About Semi Partial Correlation

What Is Semi Partial Correlation?

Semi partial correlation measures the relationship between an outcome variable and the unique part of a predictor after that predictor has been adjusted for other variables. It is also called part correlation because it correlates the outcome with only the unique part of the focal predictor.

In this guide, the focal predictor is G2. The controls are G1, studytime, failures and absences. First, G2 is predicted from the controls. Then the leftover part of G2, called residualized G2, is correlated with G3. That correlation is the semi-partial correlation.

Semi partial correlation is closely connected to hierarchical regression. When a focal predictor is added to a model after controls, the squared semi-partial correlation equals the increase in model R². In this example, adding G2 after the controls increases R² by 0.158397. Therefore, sr² = 0.158397.

This topic connects with Correlation in Python, Correlation in R, Correlation in SPSS, Correlation in Excel, Correlation Matrix, Correlation vs Regression, Multiple Linear Regression, Regression Residual Analysis, Effect Size, p-value and Confidence Interval.

Simple definition: Semi partial correlation is the correlation between Y and the part of X that remains after X has been residualized on the control variables.

Why Use Semi Partial Correlation?

Use semi partial correlation when you want to know how much unique variance a predictor adds to an outcome after other variables are already considered. It is especially helpful in hierarchical regression, model comparison and explanatory research.

Research NeedWhy Semi Partial Correlation HelpsExample in This Guide
Measure unique contributionsr² tells how much additional variance the focal predictor explains.G2 uniquely explains 15.84% additional variance in G3.
Compare reduced and full modelssr² equals R² change when the focal predictor is added last.R² increases from 0.6922 to 0.8506 after adding G2.
Understand predictor importanceIt separates unique predictor contribution from shared predictor overlap.G2 remains highly important even after controlling G1 and other variables.
Explain regression coefficientsIt connects coefficient significance with unique variance explained.G2 has t = 26.1066 and p < .001 in the full model.
Report effect sizesr and sr² are interpretable as correlation and unique variance.sr = 0.398 and sr² = 0.158.

For students and researchers, semi partial correlation is useful because it tells a different story from ordinary correlation. The zero-order G2–G3 correlation is extremely high, but semi partial correlation asks a sharper question: how much does G2 still add after G1, studytime, failures and absences are already controlled?

Semi Partial vs Partial Correlation

Partial correlation and semi partial correlation are often confused. Both use control variables, but they residualize different parts of the analysis.

MeasureWhat Is Residualized?Question AnsweredMain Result Here
Zero-order correlationNothingHow strongly are raw G2 and raw G3 related?r = 0.918548
Partial correlationBoth G2 and G3 are residualized on controlsHow strongly are the residual parts of G2 and G3 related?partial r = 0.717325
Semi partial correlationOnly G2 is residualized on controlsHow strongly is G3 related to the unique part of G2?sr = 0.397992
Squared semi partial correlationUnique part of G2 in predicting G3How much unique variance does G2 add?sr² = 0.158397

The key practical difference is that partial r² and semi partial sr² answer different variance questions. Partial r² is about the remaining residual variance after controls. Semi partial sr² is about the total outcome variance uniquely added by the focal predictor. That makes semi partial sr² especially useful for model-change interpretation.

Reporting rule: If your goal is “unique variance added to the model,” report semi partial sr² or R² change. If your goal is “relationship between residualized X and residualized Y,” report partial correlation.

Semi Partial Correlation Formula

The residual definition of semi partial correlation is:

sr = cor(Y, Xresidualized on controls)

In this guide:

sr = cor(G3, residualized G2 after G1, studytime, failures and absences)

The unique variance formula is:

sr² = R²full model − R²reduced controls-only model

Using the verified model values:

sr² = 0.850563 − 0.692166 = 0.158397

Because the coefficient for G2 in the full model is positive, the semi partial correlation is positive:

sr = √0.158397 = 0.397992

The F-change test for one added predictor is:

F = (ΔR² / df₁) / [(1 − R²full) / df₂]

Here, df1 = 1, df2 = 643, F change = 681.556962, and p = 5.437936e-103. In a normal report, this is written as p < .001.

Null and Alternative Hypotheses

The semi partial correlation hypothesis asks whether the focal predictor adds unique explanatory value after controls are already included.

StatementHypothesisMeaning
Null hypothesisH0: sr = 0G2 does not add unique variance to G3 after controlling G1, studytime, failures and absences.
Alternative hypothesisH1: sr ≠ 0G2 adds unique variance to G3 after the controls.
Equivalent model-change hypothesisH0: ΔR² = 0Adding G2 does not improve the model.
Observed resultp < .001Reject the null hypothesis.

Decision: G2 makes a statistically significant unique contribution to G3 after the controls are included. The result is not only statistically significant; it is also meaningful because ΔR² = 0.158397.

Dataset and Variables Used

The analysis uses the student performance dataset. The outcome is G3 final grade. The focal predictor is G2 second-period grade. The controls are G1 first-period grade, studytime, failures and absences.

VariableRoleMeaningWhy It Is Used
G3Outcome variableFinal gradeThe dependent variable being explained.
G2Focal predictorSecond-period gradeIts unique contribution to G3 is tested.
G1Control variableFirst-period gradeControls prior grade performance.
studytimeControl variableWeekly study-time categoryControls study effort differences.
failuresControl variablePast class failuresControls prior academic difficulty.
absencesControl variableSchool absencesControls attendance differences.

This is a strong example for semi partial correlation because G2 is clearly related to G3, but it also overlaps with G1 and other academic variables. Semi partial correlation separates the unique part of G2 from the part it shares with the controls.

Verified Semi Partial Correlation Results

The verified workbook and Python report agree on the main values for the semi partial correlation analysis.

MetricValueInterpretation
Outcome variableG3Final grade is the dependent variable.
Focal predictorG2G2 is tested for unique contribution.
Control variablesG1, studytime, failures, absencesControls are entered before the focal predictor.
N complete cases649Rows used after listwise deletion.
Zero-order correlation0.918548Raw G2–G3 relationship before controls.
Partial correlation0.717325Correlation after both G2 and G3 are residualized on controls.
Semi-partial correlation sr0.397992Correlation between G3 and residualized G2.
Semi-partial sr²0.158397Unique variance in G3 explained by G2 after controls.
Reduced R²0.692166Controls-only model R².
Full R²0.850563Controls plus G2 model R².
R² change0.158397Increase in R² after adding G2.
F change681.556962Significance test for the added G2 block.
df11One focal predictor added.
df2643Residual degrees of freedom in the full model.
t for G226.106646Full model t statistic for the focal predictor.
p-value5.437936e-103Extremely small; report as p < .001.
DecisionSignificant unique contributionG2 adds significant unique explanatory power.

The result is strong because G2 adds substantial explanatory power beyond the controls. A unique variance value of 15.84% is large in many applied educational-data settings, especially after G1 is already included as a control.

Reduced Model vs Full Model

Semi partial correlation is best understood through model comparison. The reduced model includes only the controls. The full model includes the controls plus the focal predictor G2.

ModelPredictorsAdjusted R²SSEResidual dfInterpretation
Reduced modelG1, studytime, failures, absences0.6921660.6902542081.963098644Controls alone explain about 69.22% of G3 variance.
Full modelG1, studytime, failures, absences, G20.8505630.8494011010.679276643Controls plus G2 explain about 85.06% of G3 variance.
ChangeAdded G20.1583971071.283822 reduction643G2 adds 15.84% unique variance after controls.

The reduction in SSE is also important. The reduced model has SSE = 2081.963098. The full model has SSE = 1010.679276. Adding G2 reduces unexplained error by about 1071.283822. This supports the conclusion that G2 adds a meaningful amount of explanatory value.

Full Model Coefficients

The full regression model includes G1, studytime, failures, absences and G2. The focal predictor G2 has the largest standardized beta in the full model.

TermBSEtp-value95% CI Lower95% CI UpperStandardized Beta
Intercept-0.1551900.258626-0.6000570.548680-0.6630430.352663
G10.1394570.0362273.8494940.0001300.0683190.2105960.118505
studytime0.0966990.0618101.5644700.118199-0.0246740.2180730.024829
failures-0.2182900.090861-2.4024630.016568-0.396711-0.039870-0.040084
absences0.0233670.0107942.1647810.0307720.0021710.0445620.033565
G20.8857090.03392726.1066465.437936e-1030.8190880.9523290.798796

The standardized beta for G2 is 0.798796, much larger than the standardized beta for G1, studytime, failures or absences. This confirms that G2 is the dominant unique predictor of G3 in the full model.

AdvertisementGoogle AdSense middle placement reserved here

Python Chart-by-Chart Interpretation

The Python output contains six charts that explain the complete semi partial correlation workflow: raw zero-order relationship, residualized predictor scatterplot, R² change, correlation comparison, standardized coefficients and residual diagnostics.

Python Chart 1: Zero-Order Scatterplot

Python zero order scatterplot for G2 and G3 before controls
Python zero-order scatterplot showing the raw relationship between G2 and G3 before controls.

This chart shows the raw association between G2 and G3. The relationship is very strong and positive. Students with higher G2 scores tend to have higher G3 scores. This visual pattern matches the zero-order correlation of r = 0.918548.

The chart is the starting point of the analysis. It tells us that G2 and G3 are strongly related before any controls are considered. However, this chart does not tell us how much of that relationship is unique to G2 after G1, studytime, failures and absences are already included.

That is why the semi partial analysis moves beyond this scatterplot. The zero-order relationship is real and strong, but the research question is about unique contribution, not just raw association.

Python Chart 2: Semi Partial Scatterplot with Residualized Predictor

Python semi partial scatterplot using residualized G2 predictor and G3 outcome
Python scatterplot showing G3 against residualized G2 after G2 is predicted from the controls.

This chart is the core semi partial correlation visual. The x-axis represents the part of G2 that remains after G2 has been predicted from G1, studytime, failures and absences. The y-axis remains the original G3 outcome.

The positive trend shows that the unique part of G2 still relates strongly to G3. The semi partial correlation is sr = 0.397992. This is smaller than the zero-order correlation, but it is still meaningful because it represents unique predictor information after controls.

The chart helps readers understand the difference between ordinary and semi partial correlation. Ordinary correlation uses raw G2. Semi partial correlation uses only the residualized part of G2, then correlates that part with G3.

Python Chart 3: R-Squared Change

Python chart showing R squared change after adding G2 to controls
Python chart showing reduced model R², full model R² and R² change after adding G2.

This chart shows the unique variance story directly. The reduced controls-only model has R² = 0.692166. The full model with controls plus G2 has R² = 0.850563. The increase is ΔR² = 0.158397.

This chart is one of the most important visuals because ΔR² equals sr². It shows that adding G2 improves the model by about 15.84% of total G3 variance after the controls have already explained their share.

The correct conclusion is that G2 adds substantial unique explanatory value. The model is not merely statistically significant; it also improves prediction in a practically meaningful way.

Python Chart 4: Correlation Comparison

Python chart comparing zero-order, partial and semi partial correlations
Python chart comparing zero-order correlation, partial correlation and semi-partial correlation.

This chart compares three related coefficients: zero-order r, partial r and semi partial sr. The zero-order correlation is 0.918548, the partial correlation is 0.717325, and the semi partial correlation is 0.397992.

The drop from zero-order r to semi partial sr is expected. The semi partial coefficient removes from G2 the part explained by the controls, so it focuses only on the unique part of G2. Even after this removal, the relationship remains positive and meaningful.

This chart is excellent for teaching because it prevents confusion. A reader can see that all three values answer different questions. Zero-order r answers the raw relationship question. Partial r answers the residualized-both-sides question. Semi partial sr answers the unique-predictor-contribution question.

Python Chart 5: Full Model Standardized Coefficients

Python chart showing standardized coefficients in full semi partial correlation model
Python chart showing standardized beta coefficients for the full model predictors.

The standardized coefficient chart shows that G2 is the strongest predictor in the full model. The standardized beta for G2 is approximately 0.798796. G1 has a smaller positive beta of about 0.118505, while failures has a small negative beta of about -0.040084.

This chart supports the semi partial result. If G2 has the largest unique standardized effect, it makes sense that adding G2 produces a large R² change. The chart also shows that studytime is not statistically strong in the full model, even though it is conceptually important.

For reporting, this chart should be used to explain predictor importance within the full regression model. The semi partial coefficient gives unique variance; standardized beta gives relative coefficient strength after standardization.

Python Chart 6: Full Model Residuals vs Fitted

Python residuals versus fitted chart for full semi partial correlation regression model
Python residuals versus fitted chart for checking the full regression model behind the semi partial correlation.

The residuals versus fitted chart checks whether the full regression model behaves reasonably. In a good model, residuals should be scattered around zero without a strong curved pattern. This chart helps evaluate linearity, constant variance and unusual points.

Because semi partial correlation is connected to regression, residual diagnostics are important. A large and significant semi partial correlation can still be affected by nonlinearity, outliers or heteroskedasticity. This chart reminds the reader not to rely only on sr and p-value.

The full model has strong explanatory power, but diagnostics should still be reviewed before final reporting in a research paper or thesis.

R Chart-by-Chart Interpretation

The R assets provide a colorful validation workflow for the same semi partial correlation analysis. The R PDF link returned 404 during verification, but the R chart URLs are included as the assets provided for the post.

R Chart 1: Colorful Zero-Order Scatterplot

R colorful zero order scatterplot for G2 and G3
R colorful zero-order scatterplot showing raw G2 and G3 before controls.

The R zero-order scatterplot repeats the raw G2–G3 relationship. The upward pattern is strong and supports the zero-order r value of 0.918548.

This chart confirms that the strong raw association is visible in both Python and R chart styles. It is a good opening figure for readers because it shows why G2 is a promising predictor before controls are introduced.

R Chart 2: Colorful Semi Partial Scatterplot

R colorful semi partial scatterplot with residualized predictor
R colorful scatterplot showing G3 against residualized G2 after controls.

The R residualized-predictor scatterplot shows the semi partial relationship directly. The trend remains positive, indicating that the unique part of G2 is still associated with G3.

This chart gives a visual explanation of sr = 0.397992. The relationship is weaker than the raw zero-order scatterplot but remains meaningful because it represents the unique portion of G2 after control variables have been removed from it.

R Chart 3: Colorful R-Squared Change

R colorful R squared change chart after adding G2
R colorful chart showing reduced model R², full model R² and R² change.

The R R-squared change chart visually confirms the model improvement. The reduced model explains about 69.22% of the variance in G3. The full model explains about 85.06%. The difference is 15.84%.

This is the most direct effect-size interpretation for semi partial correlation. It tells the reader exactly how much additional variance G2 contributes after the controls.

R Chart 4: Colorful Correlation Comparison

R colorful correlation comparison chart for zero order partial and semi partial correlations
R colorful chart comparing zero-order r, partial r and semi-partial sr.

The R correlation comparison chart separates the three coefficient types. It helps readers understand that semi partial sr is not supposed to equal the zero-order correlation or the partial correlation.

The main interpretation is that G2 is highly related to G3 at the raw level, remains strongly related after mutual residualization, and still contributes unique variance when only G2 is residualized.

R Chart 5: Colorful Standardized Coefficients

R colorful standardized coefficients chart for full semi partial correlation model
R colorful chart showing standardized coefficients in the full model.

The R standardized coefficient chart confirms that G2 is the dominant predictor. Its standardized beta is far larger than the other predictors in the full model.

This chart should be interpreted with the R² change chart. The coefficient chart shows predictor strength, while the R² change chart shows the unique amount of outcome variance added by G2.

R Chart 6: Colorful Residuals vs Fitted

R colorful residuals versus fitted plot for full model
R colorful residuals versus fitted chart for full model diagnostics.

The R residuals versus fitted plot provides a diagnostic check for the regression model behind the semi partial correlation. It helps detect nonlinearity, unequal residual spread and unusual cases.

The chart belongs in the post because semi partial correlation is not only a correlation idea; it is also a regression-model idea. Good reporting should include both effect size and model diagnostics.

SPSS Output and Workflow Interpretation

The SPSS output link is included in the resources section as provided. During verification, the SPSS PDF link returned a 404 response, so the numerical SPSS interpretation below is based on the verified Excel workbook and Python report values, not on additional unread SPSS-only output.

Open the SPSS Semi Partial Correlation Output PDF

In SPSS, semi partial correlation is usually read from the Part column in the regression coefficients table. The Part value for the focal predictor is the semi partial correlation. Squaring the Part value gives the unique variance explained by that predictor.

SPSS StepActionPurpose
1Analyze → Regression → LinearOpen the linear regression dialog.
2Put G3 in DependentG3 is the outcome variable.
3Put G1, studytime, failures and absences in Block 1These are the control variables.
4Put G2 in Block 2G2 is added last to test unique contribution.
5Request R squared change statisticsShows ΔR² and F change.
6Request Part and Partial correlations in coefficientsPart is the semi partial correlation.
7Interpret the G2 Part columnExpected semi partial sr is about 0.398.

In SPSS-style reporting, the result should be written as a hierarchical regression or part-correlation result: adding G2 after G1, studytime, failures and absences significantly increased R² by 0.158, with sr = .398, p < .001.

Excel Worked File Explanation

The Excel workbook is a fully worked semi partial correlation file. It includes the dataset, inputs, working data, regression formulas, semi partial result table, verified results table, chart data and interpretation guidance.

Download the Semi Partial Correlation Fully Worked Excel File

Download the Semi Partial Correlation Keyword Workbook

Excel SheetPurposeWhat It Teaches
READMEExplains workbook purpose.Defines semi partial correlation and the main formula.
DatasetStores the raw data.Keeps the workbook self-contained.
InputsDefines outcome, focal predictor, controls and alpha.Shows the model setup clearly.
Working DataStores selected variables, predictions and residuals.Shows how G2 is residualized on controls.
Regression FormulasShows coefficient formulas and model statistics.Explains reduced model, full model and focal residual model.
Semi Partial ResultFormula-driven result table.Reports sr, sr², R² change, F change and p-value.
Verified ResultsStatic verified values.Provides audit-ready output values.
Charts DataChart-ready values.Feeds correlation comparison and R² change charts.
InterpretationPlain-language result guide.Provides a report sentence and interpretation summary.

Excel Formula Logic

The workbook calculates semi partial correlation in two equivalent ways. First, it correlates G3 with residualized G2. Second, it calculates R² change and takes the signed square root.

StepExcel Formula / MethodPurpose
Predict G2 from controlsLINEST or regression formulasFind the part of G2 explained by G1, studytime, failures and absences.
Calculate residualized G2Actual G2 − predicted G2Find the unique part of G2.
Calculate semi partial sr=CORREL(G3_range,residualized_G2_range)Correlation between outcome and unique part of G2.
Reduced R²=RSQ(predicted_G3_controls_only,G3_range)Controls-only model variance explained.
Full R²=RSQ(predicted_G3_full_model,G3_range)Controls plus G2 model variance explained.
R² change=Full_R2-Reduced_R2Unique variance explained by G2.
Check sr²=sr^2Should equal R² change.
F change=(R2_change/df1)/((1-Full_R2)/df2)Test whether adding G2 improves the model.
p-value=F.DIST.RT(F_change,df1,df2)Significance of unique contribution.

The Excel interpretation sheet summarizes the result in one sentence: G2 made a significant unique contribution to G3 after controlling G1, studytime, failures and absences, sr = 0.398, sr² = 0.158, p < .001.

AdvertisementGoogle AdSense in-content placement reserved here

Python, R, SPSS and Excel Workflows

The same semi partial correlation result can be reproduced in Python, R, SPSS and Excel. The important requirement is that the same outcome, focal predictor, controls and missing-value rule are used.

SoftwareMain WorkflowBest Use
PythonUse regression to residualize G2 on controls, correlate residualized G2 with G3, compare reduced and full R², and export charts.Automated chart generation, reproducible reporting and PDF summaries.
RUse lm() models for reduced and full regression, residualize the focal predictor, calculate sr and plot colorful validation charts.Statistical validation and publication-style charts.
SPSSRun hierarchical regression and read the Part column for G2 in the coefficients table.Formal output table for thesis, assignments and research reports.
ExcelUse regression formulas, residual calculations, CORREL, RSQ, F.DIST.RT and dashboard formulas.Step-by-step teaching and transparent formula verification.

Code Blocks and Excel Formulas

Python Code for Semi Partial Correlation

import pandas as pd
import numpy as np
from scipy import stats
from sklearn.linear_model import LinearRegression

df = pd.read_csv("dataset.csv")

outcome = "G3"
focal = "G2"
controls = ["G1", "studytime", "failures", "absences"]

work = df[[outcome, focal] + controls].dropna().copy()
for col in [outcome, focal] + controls:
    work[col] = pd.to_numeric(work[col], errors="coerce")
work = work.dropna()

Y = work[outcome].to_numpy()
X_focal = work[focal].to_numpy()
X_controls = work[controls].to_numpy()

# Zero-order correlation
zero_r, zero_p = stats.pearsonr(X_focal, Y)

# Residualize focal predictor on controls
model_focal = LinearRegression().fit(X_controls, X_focal)
focal_pred = model_focal.predict(X_controls)
focal_resid = X_focal - focal_pred

# Semi-partial correlation: outcome with residualized focal predictor
sr, sr_p_simple = stats.pearsonr(Y, focal_resid)
sr2 = sr ** 2

# Reduced model: controls only
reduced_model = LinearRegression().fit(X_controls, Y)
yhat_reduced = reduced_model.predict(X_controls)
reduced_r2 = reduced_model.score(X_controls, Y)

# Full model: controls + focal
X_full = work[controls + [focal]].to_numpy()
full_model = LinearRegression().fit(X_full, Y)
yhat_full = full_model.predict(X_full)
full_r2 = full_model.score(X_full, Y)

r2_change = full_r2 - reduced_r2

n = len(work)
p_full = len(controls) + 1
df1 = 1
df2 = n - p_full - 1
f_change = (r2_change / df1) / ((1 - full_r2) / df2)
p_change = stats.f.sf(f_change, df1, df2)

print("N:", n)
print("Zero-order r:", zero_r)
print("Semi-partial sr:", sr)
print("sr squared:", sr2)
print("Reduced R2:", reduced_r2)
print("Full R2:", full_r2)
print("R2 change:", r2_change)
print("F change:", f_change)
print("df1:", df1, "df2:", df2)
print("p-value:", p_change)

R Code for Semi Partial Correlation

df <- read.csv("dataset.csv", stringsAsFactors = FALSE)

vars <- c("G3", "G2", "G1", "studytime", "failures", "absences")
work <- na.omit(df[vars])
work[] <- lapply(work, as.numeric)

# Zero-order correlation
zero_test <- cor.test(work$G2, work$G3, method = "pearson")

# Residualize G2 on controls
focal_resid <- resid(lm(G2 ~ G1 + studytime + failures + absences, data = work))

# Semi-partial correlation
sr_test <- cor.test(work$G3, focal_resid, method = "pearson")
sr <- unname(sr_test$estimate)
sr2 <- sr^2

# Reduced and full models
reduced <- lm(G3 ~ G1 + studytime + failures + absences, data = work)
full <- lm(G3 ~ G1 + studytime + failures + absences + G2, data = work)

reduced_r2 <- summary(reduced)$r.squared
full_r2 <- summary(full)$r.squared
r2_change <- full_r2 - reduced_r2

anova_change <- anova(reduced, full)

cat("Zero-order r:", unname(zero_test$estimate), "\n")
cat("Semi-partial sr:", sr, "\n")
cat("sr squared:", sr2, "\n")
cat("Reduced R2:", reduced_r2, "\n")
cat("Full R2:", full_r2, "\n")
cat("R2 change:", r2_change, "\n")
print(anova_change)
summary(full)

SPSS Syntax for Semi Partial Correlation

* Semi Partial Correlation / Part Correlation in SPSS.
* Outcome: G3.
* Focal predictor: G2.
* Controls: G1 studytime failures absences.

OUTPUT CLOSE ALL.
OUTPUT NEW NAME=Semi_Partial_Correlation_Output.

DESCRIPTIVES VARIABLES=G3 G2 G1 studytime failures absences
  /STATISTICS=MEAN STDDEV MIN MAX.

CORRELATIONS
  /VARIABLES=G3 G2 G1 studytime failures absences
  /PRINT=TWOTAIL
  /MISSING=PAIRWISE.

REGRESSION
  /DEPENDENT G3
  /METHOD=ENTER G1 studytime failures absences
  /METHOD=ENTER G2
  /STATISTICS COEFF OUTS R ANOVA CHANGE ZPP CI(95)
  /DEPENDENT G3
  /SAVE PRED RESID.

* In the Coefficients table, read the Part column for G2.
* Part for G2 is the semi-partial correlation.
* Part squared is the unique variance added by G2.

OUTPUT EXPORT
  /CONTENTS EXPORT=VISIBLE
  /PDF DOCUMENTFILE='Semi-Partial-Correlation-SPSS-Output.pdf'.

Excel Formula Patterns

Outcome:
G3_range

Focal predictor:
G2_range

Controls:
G1_range, studytime_range, failures_range, absences_range

Semi-partial sr:
=CORREL(G3_range, residualized_G2_range)

Residualized G2:
=G2_actual - G2_predicted_from_controls

Reduced R squared:
=RSQ(predicted_G3_controls_only, G3_range)

Full R squared:
=RSQ(predicted_G3_full_model, G3_range)

R squared change:
=Full_R2 - Reduced_R2

sr squared:
=sr^2

Check:
sr^2 should equal R_squared_change

df2:
=N - number_of_full_model_predictors - 1

F change:
=(R2_change/1)/((1-Full_R2)/df2)

p-value:
=F.DIST.RT(F_change,1,df2)

Decision:
=IF(p_value<0.05,"Significant unique contribution","Not significant")

Assumptions and Diagnostics

Semi partial correlation is based on regression, so its assumptions overlap with multiple linear regression assumptions. The coefficient should be interpreted after reviewing model fit, residual behavior and predictor overlap.

Assumption / DiagnosticMeaningHow to CheckWhy It Matters Here
Numeric variablesOutcome and predictors should be numeric or properly coded.Review variable types and descriptive statistics.G3, G2, G1, studytime, failures and absences are numeric-coded variables.
LinearityRelationships should be approximately linear.Use scatterplots and residual plots.Zero-order and residualized-predictor scatterplots help check this.
Independent observationsRows should not be repeated or dependent observations.Review study design.Each row should represent a separate student observation.
No extreme influential outliersOutliers can affect regression coefficients and sr.Use residual diagnostics, leverage and Cook's distance.Grade data may include low-score points that should be reviewed.
HomoscedasticityResidual spread should be reasonably stable across fitted values.Use residuals versus fitted chart.The Python and R residual charts support this diagnostic step.
No problematic multicollinearityPredictors should not be too redundant for stable interpretation.Check VIF and correlations among predictors.G1 and G2 are strongly related, so interpretation should emphasize unique contribution.
Theoretical control selectionControls should be chosen for a reason.Justify controls in the methods section.G1, studytime, failures and absences are meaningful controls for final grade.

Because G1 and G2 are both grade variables, multicollinearity and shared academic-performance information should be discussed carefully. The result is still strong, but the report should make clear that G2 is being evaluated after G1 and other controls are already in the model.

How to Report Semi Partial Correlation

A complete report should include the outcome, focal predictor, controls, sr, sr² or ΔR², model R² values, F change, degrees of freedom, p-value and interpretation.

APA-style report: A hierarchical regression was used to evaluate the unique contribution of G2 to G3 after controlling for G1, studytime, failures and absences. The controls-only model explained 69.22% of the variance in G3, R² = .692. Adding G2 increased the explained variance to 85.06%, R² = .851, ΔR² = .158. The semi-partial correlation for G2 was significant, sr = .398, sr² = .158, F change(1, 643) = 681.56, p < .001. This indicates that G2 made a substantial unique contribution to G3 after the controls were included.

Short report: G2 made a significant unique contribution to G3 after controlling for G1, studytime, failures and absences, sr = .398, sr² = .158, p < .001.

Interpretive report: The zero-order G2–G3 correlation was very strong, r = .919. After isolating the unique portion of G2 not explained by the controls, G2 still explained an additional 15.84% of the variance in G3. This makes G2 the dominant unique predictor in the full model.

Common Mistakes in Semi Partial Correlation Interpretation

MistakeWhy It Is a ProblemBetter Practice
Confusing semi partial and partial correlationThey residualize different variables and answer different questions.Use semi partial for unique variance added by the focal predictor.
Reporting sr without sr²sr² is the direct unique variance interpretation.Report both sr and sr² or ΔR².
Ignoring model ordersr depends on what controls are entered before the focal predictor.Clearly state the controls and that G2 was added last.
Calling semi partial correlation a raw correlationsr uses residualized focal predictor, not raw X.Say “G3 correlated with residualized G2.”
Ignoring multicollinearityStrong predictor overlap can affect coefficient interpretation.Check VIF and predictor correlations.
Reporting only p-valuep-value does not show unique effect size.Report sr, sr², R² change and p-value.
Claiming causationSemi partial correlation is still observational unless design supports causality.Use “unique association” or “unique contribution.”
Skipping residual diagnosticsRegression assumptions matter for interpretation.Use residuals vs fitted and outlier diagnostics.

Downloads and Resources

External References

For additional learning, review regression textbooks and software documentation on part correlation, partial correlation, hierarchical regression, R-squared change, standardized coefficients, residual diagnostics and model comparison.

FAQs About Semi Partial Correlation

What is Semi Partial Correlation?

Semi partial correlation is the correlation between an outcome and the unique part of a predictor after that predictor has been residualized on control variables.

What is the main result in this guide?

G2 made a significant unique contribution to G3 after controlling G1, studytime, failures and absences, sr = 0.397992, sr² = 0.158397, p < .001.

What does sr squared mean?

sr² is the unique proportion of outcome variance explained by the focal predictor. Here, sr² = 0.158397, meaning G2 adds about 15.84% unique explained variance in G3 after controls.

Is semi partial correlation the same as partial correlation?

No. Partial correlation residualizes both the outcome and predictor. Semi partial correlation residualizes only the focal predictor and correlates that residualized predictor with the original outcome.

Why is semi partial correlation useful in regression?

It shows the unique contribution of one predictor after other predictors are already in the model. Its squared value equals the R² change when the predictor is added last.

How do I read semi partial correlation in SPSS?

Run linear regression and request Part and Partial correlations in the coefficients table. The Part column for the focal predictor is the semi partial correlation.

Can Excel calculate semi partial correlation?

Yes. Excel can calculate it by residualizing the focal predictor using regression formulas, then using CORREL between the outcome and the residualized predictor. It can also calculate sr² as the R² change between reduced and full models.

What is the APA-style sentence for this result?

A semi partial correlation showed that G2 made a significant unique contribution to G3 after controlling for G1, studytime, failures and absences, sr = .398, sr² = .158, F change(1, 643) = 681.56, p < .001.

Does semi partial correlation prove causation?

No. Semi partial correlation measures unique statistical association. It does not prove causation unless the research design supports causal inference.

Why is the zero-order correlation larger than the semi partial correlation?

The zero-order correlation uses raw G2 and raw G3. Semi partial correlation uses only the part of G2 that is not explained by the controls, so it is usually smaller and more specific.

AdvertisementGoogle AdSense bottom placement reserved here

Need help applying this to your own data?

Salar Cafe can help interpret output, clean datasets, review assumptions, build dashboards and explain statistical results ethically.

Need help interpreting your data analysis results?

Contact Salar Cafe
Engr. Muhammad Yar Saqib author profile photo

Engr. Muhammad Yar Saqib

WhatsApp Get Data Analysis Help