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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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