BookmarkSubscribeRSS Feed
Manije72
Calcite | Level 5

Hi

I want to adjust spearman correlation to age and BMI. Is the code I used correct?

 

proc corr data=Qe rank;

partial age bmi;
var IL_2_C;
WITH CRP;
run;

2 REPLIES 2
Ksharp
Super User
/*Want this ?*/
proc corr data=sashelp.heart  spearman;
partial Diastolic Systolic ;
var weight;
WITH height;
run;
Rick_SAS
SAS Super FREQ

Almost correct. You need to add the SPEARMAN option to the PROC CORR statement. (The RANK option sorts the output, but does not compute the Spearman correlation.)

 

This is assuming that you are trying to find the correlation between the residuals of

IL_2_C and CRP
after regressing each variable onto the AGE and BMI variables.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1487 views
  • 0 likes
  • 3 in conversation