- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi all, I know that we can use proc ttest in SAS to test the mean difference between two samples. But, if we have multiple pairwise samples and conduct multiple t-tests for each pairwise sample, how can we do a joint test for them? For example, suppose there are four samples 1-4, and the H0: the means of samples 1 and 2 are equal and the means of samples 3 and 4 are equal. How can I specify the paired samples instead of comparing all the randomly selected two samples?
Thank you very much for all your help! Do appreciate!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you mean that you want a joint test comparing only two selected pairs of four means, then you can do that in many procedures with the LSMESTIMATE statement as follows. In a procedure (like PROC LOGISTIC) you might need to add the PARAM=GLM option in the CLASS statement. In procedures that don't directly support the LSMESTIMATE statement but do support the STORE statement (like PROC GLM), you will need to use the STORE statement to save the fitted model and then use the LSMESTIMATE statement in PROC PLM.
class group;
model y=group;
lsmestimate group '12' 1 -1 0 0, '34' 0 0 1 -1 / joint(label='12&34');
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Or check PROC MULTTEST on its second example for multiple t-tests.