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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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