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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 10681 views
  • 1 like
  • 2 in conversation