BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MaryA_Marion
Lapis Lazuli | Level 10

I am using SAS Studio 3.8 Enterprise Edition

SAS release: 9.04.01M6P11072018
SAS platform: Linux LIN X64 3.10.0-1062.9.1.el7.x86_64
Site name: SAS ONDEMAND FOR ACADEMICS

 

This question has to do with determining the alternate hypothesis of a Kruskal Wallis test. I can't talk about medians if shapes of distributions are not the same. How do I determine that? 

 

I want to compare the medians of three brands of bulbs. Before doing so using a K_W test, I want to see whether the shapes of the distributions of the three brands are the same. I can do histogram plots or compare cdf plots (edf option in proc npar1way). Which would be better?  Which formal test should I use? Also in case of three groups p-value for KS test is not output. Do I treat SAS output as quantiles and go to hardcopy tables?  Thank you.

 

DATA bulbs
INPUT brand $ lifetime;
subject=_n_;
DATALINES;
A  73
A  64
A  67 
A  62
A  70
B  84
B  80
B  81 
B  77
C  82
C  79 
C  71
C  75
;

proc npar1way data=bulbs;
class brand;
var lifetime;
run; quit; title

 

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

The K-W test is a general test of location and is distribution free. So you can use it regardless of the distribution(s) in the data. However, if you particularly want to test for differences in distribution shape, you can use the empirical distribution function tests available with the EDF option. These are described in the NPAR1WAY documentation. 

View solution in original post

1 REPLY 1
StatDave
SAS Super FREQ

The K-W test is a general test of location and is distribution free. So you can use it regardless of the distribution(s) in the data. However, if you particularly want to test for differences in distribution shape, you can use the empirical distribution function tests available with the EDF option. These are described in the NPAR1WAY documentation. 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

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
  • 1 reply
  • 943 views
  • 5 likes
  • 2 in conversation