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 ?
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.
You can use proc npar1way to do a Kruskal-Wallis (Wilcoxen)
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,.....
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!).]