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

Re: st: Comparing two ratios


From   "Svend Juul" <SJ@SOCI.AU.DK>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Comparing two ratios
Date   Sun, 7 Aug 2005 10:47:22 +0200

Ashwin asked:

I have three variables - var1, var2, and var1/var2 (ratio between var1 and var2). If I need to compare the mean var1/var2 ratio between two (or more) groups - do I
just use the t-test in stata or do I need to perform a different kind of analysis? 

Do I need to check the distribution of var1/var2 to
see if it's normal, and if not, maybe log transform?
 
------------------------------
 
Assuming that the name of your ratio variable is -v1v2- and you have a dichotomous -group- variable, a t-test would be OK:
  . ttest v1v2 , by(group)
PROVIDED:
- v1v2 is not too far from a normal distribution in each of the groups
- standard deviations in the two groups are not too different
 
Among the tools to examine these questions are -histogram-, -qnorm-, -swilk-, and -sdtest-. If there is a major departure from normality, you may examine potential transformations by -ladder- and -gladder-.
 
A non-parametric alternative could be:
  . ranksum v1v2 , by(group)
 
Hope this helps
Svend
 
________________________________________________________ 
 
Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6 
DK-8000 Aarhus C,  Denmark 
Phone, work:  +45 8942 6090 
Phone, home:  +45 8693 7796 
Fax:          +45 8613 1580 
E-mail:       sj@soci.au.dk 
_________________________________________________________ 

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index