Programming the statistical procedures from SAS

Procc Corr output dataset with p-value.

Accepted Solution Solved
Reply
SAS Employee
Posts: 185
Accepted Solution

Procc Corr output dataset with p-value.

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!

Accepted Solutions
Solution
‎07-06-2017 08:58 AM
Super Contributor
Posts: 281

Re: Procc Corr output dataset with p-value.

[ Edited ]

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

ODS OUTPUT PEARSONCORR=datasetname;

View solution in original post


All Replies
Solution
‎07-06-2017 08:58 AM
Super Contributor
Posts: 281

Re: Procc Corr output dataset with p-value.

[ Edited ]

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

ODS OUTPUT PEARSONCORR=datasetname;

SAS Employee
Posts: 185

Re: Procc Corr output dataset with p-value.

Thanks Paige,

Can you give me an example of this maybe using the good old sashelp.class dataset?
Super Contributor
Posts: 281

Re: Procc Corr output dataset with p-value.

SAS Employee
Posts: 185

Re: Procc Corr output dataset with p-value.

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.
🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 4480 views
  • 0 likes
  • 2 in conversation