The following HAVE contains X and Y, which are normally distributed.
data have;
do i=1 to 5000;
x=rannor(1);
y=rannor(1);
output;
end;
run;
KDE estimates the kernel densities.
ods listing gpath="!userprofile\desktop\";
ods graphics on;
proc kde;
univar x(bwm=0.05) y(bwm=0.05)/plots=(density densityoverlay);
run;
ods graphics off;
The code spits out the following three plots—(1) the kernel density of X, (2) that of Y, and (3) the overlapped one.
The problem is the third one, which poorly overlaps the first two. Though it works well without the BWMs above, I practically need to use them. What is the problem here? Thanks a lot.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.