BookmarkSubscribeRSS Feed
ralphbenno
Fluorite | Level 6

I have 2 variables   male, female

and mortality rate

 

I use proc ttest to test the NULL

do I use proc mix to test for normality

and If normality is broken then we need to use the willcoxon rank sum test?

 

can you help me with the order.>

 

below is my code

 

F test;
proc ttest data = Project;
class sex;
where sex in ("f" "m");
var rate;
run;
quit;

 

*check residue for normality;
proc mixed data = Project;
class sex;
where sex in ("f" "m");
model rate = sex/residual;
run;
quit;

 

*wilcoxom rank sum;
proc npar1way data = Project  wilcoxon;
class sex;
where sex in ("f" "m");
var rate;
run;
quit;

 

 

I do not need to do a tukey test for pair. right?

* Tukey;
proc glm data=project;
class sex;
where sex in ("f" "m");
model rate = sex / solution;
means sex / tukey;
run;
quit;

4 REPLIES 4
Reeza
Super User
T-Test is fairly resilient into devotions from normality, usually it's more important to ensure that the distribution is the same between the variables. This is more true as N gets larger.
ralphbenno
Fluorite | Level 6

then if I use proc ttest, I do not need to do proc mixed test?

 

Reeza
Super User

@ralphbenno wrote:

then if I use proc ttest, I do not need to do proc mixed test?

 


I've never used PROC MIXED so no idea.

Ksharp
Super User

If your class variable has only two levels , TTest is good enough,

If you worry about whether rate is normal distribution or not, then wilcoxom rank sum test is better choice.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1170 views
  • 1 like
  • 3 in conversation