Programming the statistical procedures from SAS

Procc Corr output dataset with p-value.

Reply
SAS Employee
Posts: 116

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!
Super Contributor
Posts: 281

Re: Procc Corr output dataset with p-value.

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

ODS OUTPUT PEARSON=datasetname;
SAS Employee
Posts: 116

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: 116

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.
Ask a Question
Discussion stats
  • 4 replies
  • 3894 views
  • 0 likes
  • 2 in conversation