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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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