BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
GemmaR
SAS Employee
Hi All,

I'm trying to make my code more dynamic and am looking to output a dataset from the Corr procedure that contains the p-values and the Pearson correlation coefficient.

Does anyone know of a way to do this?

Many thanks in advance for any help!
1 ACCEPTED SOLUTION

Accepted Solutions
Paige
Quartz | Level 8

The ODS OUTPUT command will create a SAS data set with the information you want.

ODS OUTPUT PEARSONCORR=datasetname;

View solution in original post

4 REPLIES 4
Paige
Quartz | Level 8

The ODS OUTPUT command will create a SAS data set with the information you want.

ODS OUTPUT PEARSONCORR=datasetname;

GemmaR
SAS Employee
Thanks Paige,

Can you give me an example of this maybe using the good old sashelp.class dataset?
GemmaR
SAS Employee
Thank you again!

The issue was I was writing
ods output Pearson=gemma (for example) when it needed to be
ods output PearsonCorr=gemma.

Thank you for you help.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4 replies
  • 10899 views
  • 1 like
  • 2 in conversation