turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- Kruskal Wallis

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-27-2008 01:58 PM

Does anyone know how to do a Kruskal Wallis test in SAS with TWO independent variables instead of just one?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-27-2008 04:52 PM

I haven't checked what test KW is exactly, but from what I remember, it is like an analysis of variance on ranks, isn't it ?

If so, just compute ranks with PROC RANK and then proceed with PROC GLM.

Am I correct ?

If so, just compute ranks with PROC RANK and then proceed with PROC GLM.

Am I correct ?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-27-2008 05:04 PM

Thanks. Yes, it is based on rank as far as I can tell. It seems to be a nonparametric equivalent of ANOVA and you can use proc npar1way, but now I want to add a second independent variable. It doesn't seem to allow this and the only thing I could find when I googled it was some talk of macros that created a multivariate KW, but couldn't actually get to the macro itself.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-30-2008 05:46 PM

You can use proc npar1way to do a Kruskal-Wallis (Wilcoxen)

From Documentation....

The Nonparametric One-Way ANOVA task enables you to perform nonparametric tests for location and scale when you have a continuous dependent variable and a single independent classification variable. You can perform a nonparametric one-way ANOVA using Wilcoxon (Kruskal-Wallis), median, Van der Waerden,.....

From Documentation....

The Nonparametric One-Way ANOVA task enables you to perform nonparametric tests for location and scale when you have a continuous dependent variable and a single independent classification variable. You can perform a nonparametric one-way ANOVA using Wilcoxon (Kruskal-Wallis), median, Van der Waerden,.....

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-30-2008 09:51 PM

Just rank the dependent variable and then run the two way ANOVA via GLM.

Generally, you can do any rank-based analysis using the normal theory equivalent procedure in SAS. However, you are relying on the Central Limit Theorem to get the p-values, so you may need substantial sample sizes for this to work. [That's what Wilcoxon was doing when he developed the Rank-Sum test; he was looking for an easier way to do a t-test (think hand calculation!).]

Generally, you can do any rank-based analysis using the normal theory equivalent procedure in SAS. However, you are relying on the Central Limit Theorem to get the p-values, so you may need substantial sample sizes for this to work. [That's what Wilcoxon was doing when he developed the Rank-Sum test; he was looking for an easier way to do a t-test (think hand calculation!).]