Correlation

Partial Correlation

Measures the linear relationship between two continuous variables once the variability they share with one or more other variables has been taken out.

Method summary

A partial correlation sets out to separate how much of the relationship between two variables rests on common ground they share with other variables. The calculation has two steps. Each of the two variables of interest is first regressed on the variables you want to hold constant by ordinary least squares, which removes the part of each that the controls can account for and leaves residuals behind. The Pearson correlation between those two sets of residuals is then taken. The resulting coefficient describes how much linear association remains between the two variables when the controls are thought of as fixed. For the significance calculation the degrees of freedom are lowered by the number of control variables, since each control consumes some information from the data. The coefficient reads on the same scale as Pearson's r, ranging from minus one to plus one. YouReply Analyze reports the zero-order correlation, computed with no control applied, alongside the partial coefficient, and comparing the two shows directly how much difference the controls made.

Which research questions does it answer?

  • Does the relationship between perceived workload and burnout hold up once sleep duration is held constant?
  • How much of the association between advertising recall and purchase intention survives once prior familiarity with the brand is taken out?
  • What share of the relationship between income and propensity to save belongs to age?
  • Does the link between screen time and academic achievement weaken when parental education and household size are controlled together?

When should you use it?

  • When you have a theoretical reason to suspect that a relationship between two continuous variables originates in a third one.
  • When the variable you want to control is actually measured in your file, since a variable that was never measured cannot be controlled at all.
  • When the question remains one of association; learning change per unit or predictive accuracy calls for a regression.
  • When describing relationships among scale scores while keeping a shared method effect or a demographic backdrop out of the picture.
  • When the number of controls can be kept small, since every further control lowers the degrees of freedom and complicates interpretation.

Required variable types

  • The two variables of interest must be continuous: numeric columns marked at scale level on the Variable tab.
  • Control variables are supplied as numeric columns, and you may name one or several of them.
  • Holding a categorical variable constant requires converting it to numeric indicators first, though a column coded as 0 and 1 can be used directly.
  • The analysis runs on complete rows: a row missing a value on either main variable or on any control drops out entirely, which means adding controls narrows the sample.
  • When a control carries almost the same information as one of the variables of interest, the coefficient turns unstable, as happens if a scale total and one of that scale's subdimensions appear in the same calculation.

Key assumptions

Linear relationships throughout
Both the relationship between the two main variables and each one's relationship with the controls are assumed to be linear. If a control acts in a curved fashion, a linear regression removes only part of that action and the residuals still carry its trace.
Normality
The distribution behind the p value carries a normality assumption about the residuals and the variables. The coefficient itself is computed without it; what is affected is the accuracy of the significance test.
Statistical control is not control by design
Holding a variable constant in a calculation is not the same as fixing it in an experiment. The regression removes only the linear contribution of the measured values: a control contaminated by measurement error removes only part of its own influence, and a variable never measured cannot be removed at all. For that reason the partial coefficient establishes no causation: a relationship surviving the control does not mean the remaining association is causal, only that the controls you chose do not account for it.
No excessive overlap among the controls
When controls overlap enough to stand in for one another, the regression step becomes unstable and the residuals fail to separate meaningfully. The same applies when a control is nearly identical to one of the main variables.
Independence of observations
Each row should be an independent observation. Where one person appears several times, or where clusters such as classrooms and households are present, the significance looks more favourable than it is.

How YouReply checks these assumptions

  • Linear relationships throughout: The panel runs no test of linearity. Examining the relevant pairs separately, and supplying any control you expect to act non-linearly in transformed form, is left to you.
  • Normality: No normality test is run in this method. Seeing the distributions means running the normality tests as a separate method.
  • Statistical control is not control by design: The panel makes no judgement about which variables ought to be controlled and raises no warning about an incomplete control set; assembling that set on theoretical grounds is your decision.
  • No excessive overlap among the controls: No diagnostic measure of overlap is returned. Looking at the relationships among the columns through separate correlation runs is a practical step before you assemble the control set.
  • Independence of observations: The panel does not check this assumption automatically; the researcher evaluates it.

How the analysis is run

  1. 1Drag your data file onto the upload area; a CSV or XLSX file opens in the editable grid on the Data tab.
  2. 2On the Variable tab confirm that the two main variables and every control are read as numeric, since a number stored as text cannot enter the regression step.
  3. 3Declare the missing-value codes on the same tab; because adding a control tightens the complete-rows requirement, this step bears directly on your sample size.
  4. 4On the Analysis tab pick the method from the correlation group, either through the search box or by narrowing the list with the 'Only ones that fit my data' switch.
  5. 5In the parameter form name the two columns to be related and the control variables; the control field accepts one or more columns.
  6. 6Run the analysis and read the result from the collapsible sections, where the zero-order coefficient sits beside the partial one.
  7. 7Compare the two coefficients to see how much the controls changed, then export the table to Excel and note the call named on the computation credits card.

Statistics and tables produced

Partial correlation coefficient
The Pearson correlation between the residuals of the two variables after each was regressed on the controls. It ranges from minus one to plus one and reads on the same scale as a Pearson coefficient.
Significance value
The p value computed under the hypothesis that the partial coefficient is zero, with the degrees of freedom lowered by the number of control variables.
Zero-order correlation
The coefficient computed with no control applied is given alongside for comparison. The gap between the two values shows how much the controls weakened or strengthened the relationship.
Controls and number of observations
The result names the control variables that entered the calculation and the number of observations meeting the complete-rows requirement, a figure that can fall as controls are added.
Correlation bar chart
Correlation methods belong to the correlation bar chart family, so the coefficient can be drawn as a bar and the chart saved as a PNG.

Effect size and confidence intervals

The coefficient itself
The partial coefficient is already unit-free and standardized, so no further measure of magnitude is needed. What demands care in interpretation is that the same numeric value means different things depending on the control set: a 0.30 found while controlling for one demographic variable does not carry the claim of a 0.30 found while controlling for six. This is why the coefficient is always reported together with the list of what was controlled.
Partial determination
Squaring the partial coefficient can be read as the share of variability the two variables still hold in common once the part accounted for by the controls has been removed. The panel does not return this as a field of its own, so compute it from the coefficient. Comparing it with the square of the zero-order coefficient is the most direct way to put a number on how much common ground the controls stripped away.

No confidence interval is returned for this method. The partial coefficient, the p value and the zero-order coefficient all arrive as point estimates, with no interval based on the Fisher z transformation and none for the gap between the two coefficients. Where a publication asks for an interval, it has to be produced outside the panel, accounting for degrees of freedom lowered by the number of controls.

Example research question and example result

The numbers below are a representative example, not data from a real study or a real user.

Research question
In an illustrative employee study, does the relationship between perceived workload and burnout hold once daily sleep duration is controlled?
Variables
First variable: perceived workload scale total, range 8-40 (continuous) · Second variable: burnout scale total, range 0-60 (continuous) · Control variable: reported average daily sleep in hours (continuous)
Example result
260 participants with valid values on all three variables entered the analysis. With no control applied the zero-order coefficient was 0.52; with sleep duration controlled the partial coefficient came to 0.34, p < 0.001. Lowered for one control, the degrees of freedom worked out at 257.
Interpretation
The relationship survives the control but weakens appreciably: a coefficient falling from 0.52 to 0.34 indicates that part of the association between workload and burnout arises from ground both share with sleep duration. Read through squares, shared variability drops from 27 to 12 per cent. What does not follow is that the remaining 0.34 represents a causal effect. Variables other than sleep that went unmeasured may drive both, and sleep itself is under-controlled to the extent of its own measurement error, since a self-reported average does not mirror actual sleep perfectly. The control is also statistical: nobody's sleep was experimentally fixed. The figures are illustrative.

Real output on a sample dataset

The results below were produced by the analysis engine from this data file. Changing the variable changes the research question as well; every run was computed in advance, so the page sends no request to the engine.

General customer survey (synthetic)

A wide survey of three hundred respondents: two and three category grouping variables, continuous measures, a five point ordinal scale, a binary purchase outcome, a four category brand choice, three repeated measurements, paired binary questions, three raters, four price questions and deliberately empty cells.

Rows
300
Columns
respondent_id, gender, education, region, age, income, satisfaction, service_score, price_score, quality_score, loyalty, nps_score, purchased, brand_choice, satisfaction_level, pre_score, post_score, measure_1, measure_2, measure_3, use_before, use_after, use_followup, rater_1, rater_2, rater_3, price_too_cheap, price_cheap, price_expensive, price_too_expensive, feedback_score, followup_rating
Download the dataset as CSV

The data is synthetic: it comes from a fixed random seed, not from a real study. The values below were produced by the analysis engine from this file, so uploading the same file to the panel gives the same results.

Research question: Does the relationship between satisfaction and loyalty hold once quality perception is held constant?

First variable
satisfaction
Second variable
loyalty
Controlled variables
quality_score
Partial correlation coefficient
0.114
p value
0.049
Degrees of freedom
297
Zero order correlation
0.128
p value of the zero order correlation
0.027
Difference
0.014
Valid observations
300
Significant
Yes

Computation credits: scipy 1.18.0 · statsmodels 0.14.6 · scikit-learn 1.9.0 · numpy 2.5.1 · pandas 3.0.5 · semopy 2.3.11 · 89fc29a · Data seed: 20260914

How to report the result

Controlling for daily sleep duration, perceived workload remained significantly related to burnout, partial r(257) = .34, p < .001, against a zero-order coefficient of .52.

An example sentence close to APA style; the numbers are representative.

When you should not use it

  • Only measured variables can be controlled; a confounder absent from your file never enters the calculation and the coefficient keeps carrying its influence.
  • When a control carries measurement error its influence is only partly removed, which can leave the partial coefficient higher than it ought to be.
  • A coefficient that stays significant after control indicates no causal direction, because statistical control does not substitute for experimental control.
  • Every added control lowers the degrees of freedom and tightens the complete-rows requirement, so long control lists narrow the sample and drain power.
  • Controlling for a mediator can erase a relationship artificially, and whether a variable is a confounder or a mediator is settled by theory rather than by the statistic.
  • Since linearity is not checked, a control acting in a curved fashion is only partly removed and leaves its trace in the residuals.

What to use when the assumptions are not met

  • Pearson CorrelationWhy: When there is nothing to control, or when the uncontrolled relationship needs describing first; it gives the linear association between two continuous variables.
  • Linear Regression (OLS)Why: When change per unit, that is slope coefficients, is needed, or when each control's own contribution has to be reported separately.
  • Spearman Rank CorrelationWhy: When the variables are ordinal or the distributions are clearly skewed; it measures monotonic association on ranks.
  • Mediation AnalysisWhy: When the third variable is a mediator rather than a confounder, theorised as the path along which the relationship travels.

Frequently asked questions

Which variables should I control for?
That is a question of theory rather than of statistics, and the panel offers no suggestion about it. The control set takes in variables you believe are related to both of your variables of interest and that you accept as prior to both. Controlling for a mediator, the path along which the relationship travels, can artificially erase the very link you set out to see. Assembling the set by hunting for the combination that makes the coefficient larger or significant makes the finding untrustworthy: decide the set in advance and state it in full when you report.
The partial coefficient came out larger than the zero-order one. Is that a mistake?
It is neither a mistake nor unusual. When a control plays a suppressing role, meaning it relates to the two variables in opposite directions, removing its share can leave a stronger association behind. Because the panel reports both coefficients together, you see this situation directly. Explaining such a result is clearer if you show the direction of the control's relationships with both main variables through separate correlation runs.
Why is a regression used to compute the coefficient?
A partial correlation is defined on residuals by construction: each of the two variables is regressed on the controls by ordinary least squares, which removes the part the controls can account for, and the Pearson correlation between the two remaining sets of residuals is then taken. This route also makes it possible to handle several controls at once. The degrees of freedom are lowered by the number of controls when significance is computed, because the information consumed in the regression step has to be accounted for.
Why is there no scatter plot in the result?
Correlation methods belong to the correlation bar chart family that displays the coefficient, while a scatter plot of the points is drawn when scatter data are present in the result. What a partial correlation compares is residuals rather than raw values, so a scatter of the raw variables would be misleading in any case. If you want to inspect linearity by eye, examining the relevant pairs in uncontrolled correlation runs is the practical route.

References

  • Field, A. (2018). Discovering Statistics Using IBM SPSS Statistics
  • Cohen, J., Cohen, P., West, S. G., & Aiken, L. S. (2003). Applied Multiple Regression/Correlation Analysis for the Behavioral Sciences
  • Howell, D. C. (2013). Statistical Methods for Psychology
  • statsmodels.api.OLS documentation

Try it with your own data

The free plan includes 50 analysis runs a month and needs no card.