Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: comparing mean


From   "Yulia Marchenko" <[email protected]>
To   <[email protected]>
Subject   st: RE: comparing mean
Date   Mon, 9 Aug 2004 10:21:32 -0500

On Monday, Samir wrote:

>Dear Statalisters,
>I am comparing average change in a utility score of patients in two
>groups. I see that the initial distribution of utility score is not
>same, one group have more patients with higher severity than the other.
>How can I compare the mean between these two groups controlling for the
>dissimilar distribution? How can I do it in Stata?

Before deciding what type of test to use you need to look at the
distribution of scores for each group. If it is fairly "bell-shaped" and
does not have severe outliers the usual two-sample t-test to compare means
can be used. Stata has -ttest- command to perform this test. For example,

 . sysuse auto, clear
 . ttest price, by(foreign)

The difference in distributions might be attributed not only to differences
in means but also to differences in variances of each group. In this
case -ttest- with option -unequal- should be used to account for different
variability among groups. For example,

 . sysuse auto, clear
 . ttest price, by(foreign) unequal

The Stata command -robvar- allows you to test if the variances among several
groups are equal. For the previous example,

 . sysuse auto, clear
 . robvar price, by(foreign)

For this particular example there is no significant evidence to reject
hypothesis of equal variability among Domestic and Foreign groups.
Therefore, there is no need to specify -unequal- option in -ttest-.

If the distribution is heavily skewed then test on medians should be
performed instead. Various commands are implemented in Stata to do this. See

 . help signrank

For more information on the above commands, please, see Stata manuals or
type

 . help ttest
 . help robvar

--Yulia
[email protected]

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index