[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Comparing two ratios
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)
- 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
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
* For searches and help try: