BookmarkSubscribeRSS Feed
waana
Calcite | Level 5
Hi guys,

Use proc corr we can produce correlation matrix, but some pairwise correlations are not significant. Is there any way to set non-significant correlations to 0 in the matrix?

Thanks,
2 REPLIES 2
Ksharp
Super User
Hi.
Maybe you need 'ods output' to write the result into a dataset.then use data step to set zero.


[pre]
ods trace on;
ods output pearsoncorr=corr;
proc corr data=sashelp.class;
var weight height;
run;
ods output close;
ods trace off;
[/pre]



Ksharp
plf515
Lapis Lazuli | Level 10
> Hi guys,
>
> Use proc corr we can produce correlation matrix, but
> some pairwise correlations are not significant. Is
> there any way to set non-significant correlations to
> 0 in the matrix?
>
> Thanks,

Why would you wish to do this? Perhaps there is a good reason, but I cannot think of one. If a correlation is not significant, it does NOT mean it is 0. Creating a matrix where nonsignificant correlations are reported as 0 is .... well, it's distorting your data. It seems to be to be equivalent to any other method of changing results. Not good.

Peter

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
  • 2 replies
  • 1242 views
  • 0 likes
  • 3 in conversation