BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
LanMin
Fluorite | Level 6

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

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

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

View solution in original post

2 REPLIES 2
PGStats
Opal | Level 21

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
LanMin
Fluorite | Level 6

Thanks so much, PG .

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1238 views
  • 0 likes
  • 2 in conversation