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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1338 views
  • 0 likes
  • 3 in conversation