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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1310 views
  • 0 likes
  • 3 in conversation