
Exploring Correlations and Partial Correlations in the Midlife in the United States Study
1 Objectives
- To investigate and report upon correlations and partial correlations
- To conduct and report upon an ANCOVA upon a similar set of variables
2 Background
The Midlife in the United States (MIDUS) study is a national longitudinal research project examining how psychological, social, and biological factors affect health and aging. It began in 1995–96 with over 7,000 adults aged 25–74 and has continued through multiple follow-up waves. MIDUS includes survey data, daily diaries, cognitive testing, and biological samples.
In 2012, MIDUS added a Milwaukee-based sample of about 500 African American adults as part of its “refresher wave.” This oversample was designed to address racial disparities and increase the study’s diversity. It focused on factors like socioeconomic status, discrimination, health, family life, and spirituality, aiming to explore how stress, race, and culture intersect to affect well-being.
Data are publicly available through ICPSR and the MIDUS website, and the study has supported extensive research on health disparities, resilience, and aging. The data included here are a subset of the full set of over 2,000 variables.
2.1 Data
The data are available in Brightspace in two formats:
- As an SPSS data file.
- The variable labels are taken from the descriptions given in both the official MIDUS Codebook and the one created for our subset of variables.
- As a CSV file.
- Do please refer to this codebook for explanations of the variables.
I have created a sort of codebook for the subset of variables we will use. That codebook includes links to the actual, official MIDUS Codebook that explains what each of the variables in this subset measure. You will see that many of the variables are coded so that higher scores are less desirable (denoting worse health, etc.), so please do be mindful of this when interpreting the results.
Please also note that these data are made available to you for use in this course only. For any other uses, including in published research, one must register with the MIDUS study.
3 Investigating the Relationships
You may use either Excel/Calc or SPSS (e.g., via Apporto) to compete this assignment. Note, however, that it is much easier to compute partial correlations in SPSS.
Whichever you choose to use, please:
- Choose 5 – 10 variables you find the most interesting.
- Present the correlations between them in a correlation matrix (either a full or, e.g., just the lower triangular diagonal).
- Choose two bivariate correlations1 (between two different sets of variables2); present both of these two correlations along with partial correlations between these same pairs. You may use the same, third variable to partial out of these bivariate correlations or a different third variable for each bivariate.
- Interpret all of these results as they could be presented in a Results section of a manuscript.
Your deliverable will be a Word/Writer or PDF document that presents the tables/figures and text as they would in a typical (e.g., APA-formatted) Results section.
4 Conducting Correlations and Partial Correlations
4.1 In Excel
4.1.1 Creating Correlations
The process is, of course, the same as was done in the previous assignment:
Choose the
Dataribbon in ExcelClick on
Data Analysisunder theAnalyzesection of that ribbonIn the dialogue box that opens, select
Correlationand thenOK.In the next dialogue box that opens, click the small icon next to the
Input Rangefield to minimize that dialogue:
Select the range of cells that contains the two columns you’d like to correlate3. It’s all right that your selection will include more columns than just those two.
Once you’ve selected the cell range you’d like to correlate, click on the little icon to the right of the
Input Rangefield again to expand out that dialogue box:
Back in that dialogue box:
- Leave selected
Group By:Columns - Select
Labels in First Row - Under the
Output optionssection, selectNew Worksheet Plyand give that new worksheet a name, e.g.,Correlation4.
- Leave selected
4.1.2 Creating Partial Correlations
This is not as easy to do in Excel.
- Choose which two variables you would like to correlate and which third variable you would like to partial out of that correlation. Let us say you are using
RAACA2,RAACA1,RAACAS6A, which are, respectively:Mental/emotional health self-evaluatedPhysical health self-evaluatedCompare energy now to 5 years ago
- Regress
RAACA2onRAACAS6Aand get residuals- Go to
Data > Data Analysis > Regression(first enabling theAnalysis Toolpakif needed).
- Set
RAACA1Range =RAACA2,RAACA2Range =RAACAS6A.
- Check
Output Residualsand run the regression.
- Save the residuals for
RAACA2(call them, say,A1_AS6A) in, e.g., columnBP.
- Go to
- Regress
RAACA1onRAACAS6Aand get residuals- Repeat the regression, this time with
RAACA1as the dependent variable andRAACAS6Aas the independent variable.
- Save the residuals for
RAACA1(call them, say,A1_AS6A) in columnBQ.
- Repeat the regression, this time with
- Correlate the residuals
- Use the
CORRELfunction to calculate the correlation between RX and RY:
=CORREL(BP3:BP510, BQ3:BQ510) - This value is the partial correlation between
RAACA2andRAACA1, controlling forRAACAS6A.
- Use the
4.2 In SPSS
4.2.1 Creating Correlations
- Click on
Analyis > Correlate > Bivariate ... - In the dialogue box that opens, add the variables you would like to correlate to the
Variablesfield - In the
Correlation Coefficientssection of that dialogue, leavePearsonchecked (since there are variables that are certainly interval/ratio)- Many of the variables are from Likert-scaled items. Some argue to treat these like ordinal variables, in which case you could select to also include either
Kendall's tau-borSpearman. As we noted in lecture, Kendall’s \(\tau\) is less efficient than Spearman’s \(\rho\). Spearman’s \(\rho\) is efficient enough that it tends to produce results similar to Pearson’s r while also being more robust than r. - So, if you want to use either of these, I suggest selecting
Spearman.
- Many of the variables are from Likert-scaled items. Some argue to treat these like ordinal variables, in which case you could select to also include either
- In the
Test of Significancesection, leaveTwo-tailedchecked. As we also noted in lecture, two-tailed tests evaluate whether the correlation is different than zero in either direction (positive or negative). (A one-tailed would evaluate if the correlation is only, e.g., both different from zero and positive.)- Also leave checked to
Flag significant correlationsto let SPSS place asterisks next to correlations where p < .05 etc. - You can also select to
Show only the lower triangleof the correlation (and then perhaps de-selectShow diagonalto remove the auto-correlations that are all 1s). This will only show the bottom half of the correlation matrix. Some prefer this since style; it’s your choice if you do, too.
- Also leave checked to
- Click on the
Optionsbutton; in the dialogue that opens, chooseExclude cases pairwise—not the default option for SPSS,Exclude cases listwise5.- You can also ask SPSS to present to
Means and standard deviationsif you want. Presenting theCross-product deviations and covarianceswould show the unstandardized associations between the variables, which doesn’t really add anything here.
- You can also ask SPSS to present to
- In the
Confidence interval...dialogue, you can also select toEstimate confidence interval of bivariate correlaiton parameter, leaving theConfidence interval (%)to be95(reflecting \(\alpha\) = .05).- If you choose to add Spearman’s \(\rho\), then it doesn’t hurt to also
Apply the bias adjustment. Spearman’s \(\rho\) can mis-estimate correlations with small samples (usually n < 30); this adjustment helps offset that bias. Our sample size is large enough that this shouldn’t matter, but this adjustment wouldn’t adversely affect large correlations.
- If you choose to add Spearman’s \(\rho\), then it doesn’t hurt to also
- Click
OKs to finish and marvel at your work.
4.2.2 Creating Partial Correlations
Click on
Analyis > Correlate > Partial...In the dialogue box that opens:
- Add
RAACA2andRAACA2to theVariablesfield - Add
RAACAS6Ato theContorlling forfield:
::: {.cell} ::: {.cell-output-display}
::: :::- Note that under the
Optionsbutton, you can choose to present eitherMeans and standard deviationsto present those orZero-order correlationsto present the bivariate (aka “zero-order”) correlations along with the partial correlations. - Please also choose to
Exclude cases pairwise.
- Add
Click
OK.
This will report the bivariate correlation between RAACA2 (Mental/emotional health self-evaluated scaled where higher numbers denote worse health) and RAACA1 (Physical health self-evaluated, scaled the same), controlling for RAACAS6A (Compare energy now to 5 years ago).
This could be described as:
Table 1 presents the mean, standard deviation, and number of responses to RAACA2 (Mental/emotional health self-evaluated) and RAACA1 (Physical health self-evaluated) and RAACAS6A (Compare energy now to 5 years ago). All variables were coded so that higher values denote worse outcomes. For RAACA2 and RAACA1, values ranged from 1 (“Excellent”) to 5 (“Poor”); “Don’t know” and refusals to respond were coded as missing values.
Table 1: Mean, SD, and N Self-Reported Mental/Emotional Health (RAACA2), Physical Health (RAACA1), and Whether One’s Energy Has Improved or Worsened Compared to 5 Years Ago.
We can see in Table 1 that participants tended to self-report slightly better mental than physical health (\(\overline{X}_{Mental}\) = 2.62; \(\overline{X}_{Physical}\) = 2.98; lower values denote better health). Most participants reported that their health was getting slightly worse (\(\overline{X}\) = 3.18 where 3 = “Stayed the same” and 4 = “Gotten a little worse”.
Table 2: Zero-order Correlation Between Self-Reported Mental/Emotional Health (RAACA2) and Physical Health (RAACA1) Along with the First-Order Controlling for Whether One’s Energy Has Improved or Worsened Compared to 5 Years Ago. Significance (2-tailed) presents the p-value for tests of significance.

Self-reported mental/emotional health and physical health were strongly and significantly correlated (r = .53, p < .001): feeling better (or worse) about one’s mental health was associated Mental and physical health tended to move the same direction. This relationship was in part due to their shared variance with how much energy participants reported having now compared to 5 years ago (partial r = .45); those who felt their health has improved tended to also say that both their mental and physical health were also good.
5 Conducting an ANCOVA
An ANCOVA is an analysis of covariance. It is similar to other ANOVAs in that it compares the mean of a continuous outcome across groups, but it also controls for one or more continuous covariates. In other words, ANCOVA lets you ask whether groups differ on an outcome after statistically adjusting for another variable.
For this section, please choose:
- One continuous dependent variable
- One categorical (or—to increase the number of options—an ordinal variable) grouping variable
- One continuous variable to serve as a covariate
For example, using the MIDUS data, you might test whether body mass index differs across self-rated mental/emotional health groups while controlling for age:
- Dependent variable:
RAACBMI(Body mass index) - Fixed factor/grouping variable:
RAACA2(Mental/emotional health self-evaluated) - Covariate:
RAACRAGE(Age)
Please remember that many of the MIDUS variables are coded such that higher values reflect less desirable outcomes. For RAACA2, higher values indicate worse self-rated mental/emotional health.
5.1 In SPSS
5.1.1 Checking the Homogeneity of Regression Slopes Assumption
ANCOVA assumes that the relationship between the covariate and the dependent variable is approximately the same across groups. In this example, that means that the relationship between age and BMI should be similar across the RAACA2 groups.
To check this assumption in SPSS:
- Click on
Analyze > General Linear Model > Univariate... - Add the dependent variable, e.g.,
RAACBMI, to theDependent Variablefield. - Add the categorical predictor, e.g.,
RAACA2, to theFixed Factor(s)field. - Add the covariate, e.g.,
RAACRAGE, to theCovariate(s)field. - Click on
Model.... - Choose
Custom. - Add the following terms to the model:
RAACA2RAACRAGERAACA2 * RAACRAGE
- Click
Continue. - Click
Options.... - Select:
Descriptive statisticsEstimates of effect sizeHomogeneity testsParameter estimates
- Click
Continue. - Click
OK.
The key test in this first model is the interaction between the grouping variable and the covariate, e.g., RAACA2 * RAACRAGE. If this interaction is statistically significant, then the relationship between age and BMI differs across mental/emotional health groups. That would mean the standard ANCOVA model is probably not appropriate, at least not without reporting and interpreting that interaction.
If this interaction is not statistically significant, you may proceed with the usual ANCOVA model without the interaction term.
5.1.2 Running the ANCOVA
To run the main ANCOVA model in SPSS:
- Click on
Analyze > General Linear Model > Univariate... - Add the dependent variable, e.g.,
RAACBMI, to theDependent Variablefield. - Add the categorical predictor, e.g.,
RAACA2, to theFixed Factor(s)field. - Add the covariate, e.g.,
RAACRAGE, to theCovariate(s)field. - Click on
Model.... - Choose
Custom. - Add only the main effects to the model:
RAACA2RAACRAGE
- Click
Continue. - Click
Options.... - Select:
Descriptive statisticsEstimates of effect sizeHomogeneity testsParameter estimates
- Move your grouping variable, e.g.,
RAACA2, into theDisplay Means forbox. - Check
Compare main effects. - Select a correction such as
BonferroniorSidak. - Click
Continue. - Click
OK.
The main output to report is the Tests of Between-Subjects Effects table. In that table:
- The row for the covariate, e.g.,
RAACRAGE, tells you whether age is significantly related to BMI. - The row for the grouping variable, e.g.,
RAACA2, tells you whether adjusted BMI differs across mental/emotional health groups after controlling for age. - The
Partial Eta Squaredcolumn gives an effect size for each predictor.
The Estimated Marginal Means table gives the adjusted group means. These are the means for each group after controlling for the covariate.
This could be described as:
An ANCOVA was conducted to examine whether BMI differed across self-rated mental/emotional health groups while controlling for age. The homogeneity of regression slopes assumption was first evaluated by testing the interaction between mental/emotional health and age. If the interaction was not statistically significant, it was removed from the final ANCOVA model. In the final model, age was included as a covariate and self-rated mental/emotional health was included as the grouping variable. Adjusted means were inspected to determine the direction of group differences.
5.2 Using the Online ANCOVA Calculator
You may also compute an ANCOVA using the StatsCalculators ANCOVA calculator.
- Open the ANCOVA calculator.
- In the
Load Your Datasection, either:- click
Upload Dataand uploadmidus.csv, or - open
midus.csv, copy the relevant columns, and paste them into the data area.
- click
- In the
Select Columns & Optionssection, choose:Factor Column: the grouping variable, e.g.,RAACA2Covariate Column: the covariate, e.g.,RAACRAGEDependent Variable Column: the outcome, e.g.,RAACBMI
- Leave
Sum of Squares Typeset toType IIunless you have a specific reason to use another option. - Leave the
Significance Levelset to.05. - Click
Run ANCOVA Analysis.
In the output, look for:
- The ANCOVA table, especially the row for your grouping variable.
- The adjusted means for each group.
- The assumption checks, especially the test of homogeneity of regression slopes.
- The effect size, usually reported as partial eta squared.
Please note that this calculator can produce post-hoc comparisons as part of the ANCOVA output. These are the most appropriate post-hoc comparisons for the adjusted means because they are based on the ANCOVA model.
5.3 Supplemental Post-Hoc Analyses with Games-Howell
You may also use the Games-Howell post-hoc calculator to examine which groups differ from each other on one of your continuous variables.
However, please note an important distinction: Games-Howell is a post-hoc test for comparing unadjusted group means. It does not control for a covariate. So, if your main analysis is an ANCOVA, Games-Howell should be described as a supplemental follow-up comparison rather than as the adjusted ANCOVA post-hoc test.
For example, you could use Games-Howell to compare mean BMI across levels of self-rated mental/emotional health:
- Grouping variable:
RAACA2 - Outcome variable:
RAACBMI
To run this test:
- Open the Games-Howell test calculator.
- In the
Load Your Datasection, either uploadmidus.csvor paste in the relevant columns. - In the
Select Data Format & Optionssection, chooseLong Format (One row per observation). - Set the group column to your grouping variable, e.g.,
RAACA2. - Set the value column to your continuous outcome, e.g.,
RAACBMI. - Leave the significance level set to
.05. - Click
Run Games-Howell Test.
In the output, look for the pairwise comparisons table. Each row compares two groups. Report:
- the two groups being compared
- the mean difference
- the confidence interval
- the adjusted p-value
- whether the groups differ significantly
This could be described as:
Because the grouping variable contained more than two groups, supplemental pairwise comparisons were conducted using Games-Howell tests. Games-Howell was used because it does not require equal variances or equal sample sizes across groups. These comparisons were interpreted as unadjusted follow-up tests and not as a substitute for the adjusted ANCOVA results.
6 Exporting Tables & Figures from SPSS into a Word Processor
If you are using a local version of SPSS (e.g., that you purchased yourself) you can simply right-click on tables and figures to copy them and then paste them into, e.g., MS Word.
However, if you are using SPSS through Apporto, it is less straight forward.
6.0.0.1 Option 1: Work within Apporto
- Right-click to copy a figure or table within Apporto
- Open a document in Word within Apporto
- Paste the figure/table into that online Word document
- Save that Word document
- In the Apporto menu at the top of the browser window, click on the Download button:

- In the dialogue that opens, select that Word document to download it to your computer
6.0.0.2 Option 2: Download First from Apporto
Note that it is difficult to modify figures that are exported with these steps, so I advise first making any changes to those within SPSS in Apporto before downloading them.
- In the SPSS Output window, selection
File > Export... - In the dialogue that opens:
- Select
Allfrom theObjected to Export6 - Under
Type, selectWord Document (*.docx). Note that several of the other options (e.g.,HTML (*.html)orPowerP{oint (*.ppt)) could also work for other uses. - Under
File Name, you may change the name of the output file. Note that you should only change the last part of what is presented, afterDocuments/. Simiarly, I suggest notBrowsingto a new location; just leave that going to the default location, which is the Documents folder online. - If you leave the
File Nameas the default given, you may need to retype that in aSave Filedialogue that opens. - Click
OK. A Word file that is the exported output file will now be created within Apporto.
- Select
- Click on
Downloadin the Apporto menu at the top of the browser window, and download that output file turned Word document to your computer. - You may now open that file on your computer.
Thanks!
Footnotes
“Bivaraite correlations” are correlations between two (“bi”) variables. I.e., these are the normal correlations you are used to. (They’re also called zero-order correlations.)↩︎
I.e., four variables total for bivariate correlations.↩︎
Using keys, you can move into cell
C1, then typeShift + Control/Command + Down Arrow, then—still holding down just theShiftkey, tap theRight Arrowkey to select over to cellF5017.↩︎Since we’re only computing a few correlations, you could also instead choose
Output Rangeand place the correlation somewhere on that same worksheet, e.g., cellJ1, but I make it a habit of putting results, new tables, etc. in new worksheets to keep my data in one, clean sheet and any work on it in other sheets.↩︎“Excluding cases pairwise” means that if any of the variables used in that particular analysis has a missing value, then skip that row for that analysis. “Excluding cases listwise” means to not include a row of the data if any of the values are missing, regardless of whether they were used in a particular analysis. Listwise deletion, therefore, excludes more data than pairwise. Researchers have found that listwise is often not only too aggressive: it either removes useful information of data are indeed missing as random or accentuates bias if the data are not missing at random.↩︎
You can select, e.g.,
All visible, but simplest is just to export the whole output file and then work with it locally.↩︎