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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 10496 views
  • 1 like
  • 2 in conversation