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
- /
- Base SAS Programming
- /
- test of difference in median

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

08-03-2013 11:10 PM

May I ask you if my interpretation of SAS results are correct. thanks !!!

my data has a class variable u_rank, it takes on two values 1, and 4,

my test variable is disclose (a continuous variable).

I use proc npar1way to test difference in median of disclose between u_rank=1 and u_rank=4.

see below for code (attached)

my interpretation is :

median is zero for both u_rank=1 or 4

I am not certain:

The NPAR1WAY shows z value to be significant.

could I conclude : even though median value of disclose is 0 for both u_rank=1 and u_rank=4 , but median test still shows significant difference between the class variable u_rank?

thanks !!!

Lan

Accepted Solutions

Solution

08-04-2013
12:13 AM

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

Posted in reply to LanMin

08-04-2013 12:13 AM

Yes you could. Your data likely has a fair proportion of disclose=0 observations in both u_rank groups. Run the following simulation:

**data test;****call streaminit(987676);****do u_rank = 1, 4;**** do i = 1 to 2520;**** if mod(i, 2) then disclose = 0;**

** ****else disclose = rand("NORMAL", u_rank*0.05);**** output;**** end;**** end;****drop i;****run;**

** **

**proc univariate data=test;****class u_rank;****var disclose;****histogram;****run;**

**proc npar1way data=test median wilcoxon;****class u_rank;****var disclose;****run;**

PG

PG

All Replies

Solution

08-04-2013
12:13 AM

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

Posted in reply to LanMin

08-04-2013 12:13 AM

Yes you could. Your data likely has a fair proportion of disclose=0 observations in both u_rank groups. Run the following simulation:

**data test;****call streaminit(987676);****do u_rank = 1, 4;**** do i = 1 to 2520;**** if mod(i, 2) then disclose = 0;**

** ****else disclose = rand("NORMAL", u_rank*0.05);**** output;**** end;**** end;****drop i;****run;**

** **

**proc univariate data=test;****class u_rank;****var disclose;****histogram;****run;**

**proc npar1way data=test median wilcoxon;****class u_rank;****var disclose;****run;**

PG

PG

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

Posted in reply to PGStats

08-04-2013 07:06 PM

Thanks so much, PG .