BookmarkSubscribeRSS Feed
themanoj20080
Fluorite | Level 6

Hello everyone,

 

Is there a way to get the p-value for the spearman correlation coefficient inside PROC IML. I know I can get it using PROC CORR but I want to avoid using that. 

 

Thanks,

 

Manoj

6 REPLIES 6
PaigeMiller
Diamond | Level 26

The way to compute the p-value is explained at Wikipedia. You'd have to program this in IML.

--
Paige Miller
themanoj20080
Fluorite | Level 6

Yes I did that exactly and it was quite easy.

Reeza
Super User

@themanoj20080 wrote:

Yes I did that exactly and it was quite easy.


Then please post the answer for future users and mark this question as closed.

Reeza
Super User

There's a function call CORR for IML, with a method for spearman included.

 

https://documentation.sas.com/?docsetId=imlug&docsetTarget=imlug_langref_sect083.htm%3Flocale&docset...

 


@themanoj20080 wrote:

Hello everyone,

 

Is there a way to get the p-value for the spearman correlation coefficient inside PROC IML. I know I can get it using PROC CORR but I want to avoid using that. 

 

Thanks,

 

Manoj


 

themanoj20080
Fluorite | Level 6
It doesn't give a pvalue.
Reeza
Super User

Sorry, you will need to calculate that from the formula and using the probability formulas as indicated via @PaigeMiller

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!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 6 replies
  • 1463 views
  • 2 likes
  • 3 in conversation