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
- /
- Analytics
- /
- Stat Procs
- /
- PROC NPAR1WAY mean/median comparison

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
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-31-2015 09:31 AM

Good Day SAS friends:

I'm trying to carry an analysis about non parametric ANOVA (Kruskal-Wallis) using PROC NPAR1WAY to analise 4 groups and i cant find information how to compare means/medians, if you can help me to find any way to use some TUKEY (or similar) to do this, i would appreciate very much.

Thanks a lot

Accepted Solutions

Solution

01-31-2015
11:48 AM

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

Posted in reply to jonatan_velarde

01-31-2015 11:48 AM

This link might be of some help to you.

22620 - Can I get nonparametric multiple comparisons from PROC NPAR1WAY?

All Replies

Solution

01-31-2015
11:48 AM

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

Posted in reply to jonatan_velarde

01-31-2015 11:48 AM

This link might be of some help to you.

22620 - Can I get nonparametric multiple comparisons from PROC NPAR1WAY?

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

Posted in reply to data_null__

02-02-2015 07:24 AM

Hi there and thanks a lot for the answer.

I saw this treat in SAS questions, latter i found this article:

http://www.lexjansen.com/pharmasug/2004/statisticspharmacokinetics/sp04.pdf

here, the author accomplish the comparison using an MACRO called **"%DUNN"**

Now im worry about running that macro, cause i never worked with any macros....

Could you send me some information about runnig macros ??

Thanks

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

Posted in reply to jonatan_velarde

02-02-2015 08:50 AM

Macros are easy to run "if they work". It is just a matter of submitting the macro code followed by a "macro call".

%macro DUNN(....);

<sas code>

%mend DUNN;

%DUNN(.......);

Also the SAS online documentation has everything you want to know about how to run macros.

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

Posted in reply to data_null__

02-02-2015 08:53 AM

Thanks one more time for your help.

i found the macro here:

http://www.alanelliott.com/kw/KW_MC.sas

i tried too but no succes.

Thanks

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

Posted in reply to jonatan_velarde

02-02-2015 09:13 AM

You will have to show your work.

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

Posted in reply to data_null__

02-11-2015 12:19 PM

sorry for delayed answer my SAS friends:

Finally i made it, run the DUNN macro and fixed the problem.

Thanks a lot.

If its necesary you can ask for the complete routine here.

Big Hugs

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

Posted in reply to data_null__

08-31-2016 11:10 AM

Hello,

I am attempting to run the Dunn Macro package of code right now. I am about half way through but have gotten snagged on a data step. It seems like there are more coming up as well.

data KW_MC_TMP5;set KW_MC_TMP5;

1294 N=_N_;

1295 keep n mean1-mean&groups;

WARNING: Apparent symbolic reference GROUPS not resolved.

ERROR: Missing numeric suffix on a numbered variable list (mean1-mean).

ERROR 22-322: Syntax error, expecting one of the following: a name, ;, _ALL_, _CHARACTER_,

_CHAR_, _NUMERIC_.

ERROR 200-322: The symbol is not recognized and will be ignored.

Is there a way to resolve this? I am relatively new to SAS and trying to learn while using (not highly recommended) but any advice with this will be greatly appreciated.

The upcoming steps have similar synthax.

data KW_MC_TMP6;set KW_MC_TMP6;

N=_N_;

keep n n1-n&groups;

run;

data KW_MC_TMP7;set KW_MC_TMP7;

N=_N_;

keep n gp1-gp&groups;

run;

Thanks!

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

Posted in reply to jonatan_velarde

02-01-2015 01:49 AM

Or you could check Row Mean Scores in proc freq .

ANOVA (Row Mean Scores) Statistic

The ANOVA statistic can be used only when the column variableY lies on an ordinal (or interval)

scale so that the mean score ofY is meaningful. For the ANOVA statistic, the mean score is computed

for each row of the table, and the alternative hypothesis is that, for at least one stratum, the mean

scores of the R rows are unequal. In other words, the statistic is sensitive to location differences

among the R distributions ofY.

When there is only one stratum, this CMH statistic is essentially an analysis of variance (ANOVA)

statistic in the sense that it is a function of the variance ratio F statistic that would be obtained from

a one-way ANOVA on the dependent variableY. If nonparametric scores are specified in this case,

then the ANOVA statistic is a **Kruskal-Wallis test.**

**If there is more than one stratum, then this CMH statistic corresponds to a stratum-adjusted ANOVA**

**or Kruskal-Wallis test.** In the special case where there is one subject per row and one subject

per column in the contingency table of each stratum, this CMH statistic is identical to Friedman’s

chi-square.

Xia Keshan