[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Log transform of skewed data
At 14:53 02/06/04 -0400, you wrote:
Log-transformed data can often be understood in terms of geometric means
and their ratios. If in Stata you type
I have data on the "cost" (actually tranformed hours) of various types of
caretaking for Alzheimers patients. I'm interested in a regression model to
test treatment effects in a multisite study. As is usual for cost data, it
is positively skewed. So, I contemplated a log transform, either through a
direct transformation of the response, or through a log link in a glm, gee,
or something similar. I actually am using "xt" commands to allow for
nonindependence among caretakers treated at the same site.
the problem is that the mode cost is $0, so that the distribution is
bimodal. This, of course, remains true if I do a lof transform. Any ideas on
how to analyze such data would be apreciated.
then you should be taken to my website, where you can download my Stata Tip
on the -eform- option of -regress- (Newson, 2003), which shows how to use
this to calculate confidence intervals for geometric means and their ratios.
If there are zeros, however, then there is a problem, because the log of
zero is not defined. In this case, you either have to transform the zeros
to something else, or use arithmetic means instead of geometric means, with
a log link function, in a glm or gee, usually using the -eform- option. The
parameters will then be arithmetic means and their ratios, instead of
geometric means and their ratios. Arithmetic means are still defined if the
outcome is possibly zero, as is the case with loglinear modelling of count
data, and the principle is the same with non-count data such as your
caretaker-hours. The trick with the -noconst- option, mentioned in Newson
(2003) may still be useful if you want a baseline arithmetic mean for a
Hope this helps.
Newson R. Stata tip 1: The eform() option of regress. The Stata Journal
2003; 3(4): 445.
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Opinions expressed are those of the author, not the institution.
* For searches and help try: