# st: adjust after logistic, worked example

 From "Jan Brogger" To "Statalist" Subject st: adjust after logistic, worked example Date Sun, 21 Sep 2003 10:43:39 +0200

```This is in re to Laural Copeland/Elisabeth Eby. Questions on -adjust-
pop up every now and then. I've worked through an example. Hope it
helps.

In my experience, -adjust- is dangerous if used blindly, specifically
when used after logistic to get adjusted percentages/prevalences. Could
this be the problem? Conceptually, it is simple. You must decide which
population to adjust to. But then you must tell -adjust- to what
population you want to adjust. If you don't specify which population to
adjust to, -adjust- will give you results that may not be what you want.

The situation does get somewhat sticky if  you have interactions and/or
spline variables (but still solvable)

A simple worked example is below. This is data from a randomized trial,
but we can pretend it is an observational study. It should be analyzed
with survival analysis, but let's pretend we don't need to.

.sysuse cancer , clear
.ds
.gen alive=1-died
.xi:logistic alive i.drug

The use of drug is associated with a much higher survival. The
unadjusted odds ratios for both drugs is 25. The observed survival
fraction is 5% with placebo and 57% in both drug groups.

Let's pretend that the association is confounded by age.
.xi:logistic alive i.drug age

The adjusted odds ratio for drug 2 is 35 and for drug 3 is 26 (a 40% and
4% change in the odds ratio, respectively). Now what about the adjusted
percentage survival?

You can do:
Apparently, the observed survival is 4.2% in the placebo group, and 58%
in both drug groups. But to what population is this adjusted ? This
estimate is not adjusted for age - because you need to specify it:

To what population is this adjusted? It is to a population that has the
same mean age as the combined study sample. This may not be the most
interesting population to adjust to - it may not be meaningful at all.

So let's adjust to the age distribution of the placebo group.
.summ age if drug==1

Now, the observed survival is 4.2% in the placebo group, and 61% in drug
2 group but 53% in drug 3 group. If you believe that age should be
adjusted for, and the age distribution in the placebo group is a
percentages that you should.

Yours

Jan Brogger
PhD fellow
Dept. of Thoracic Medicine, Institute of Medicine, University of
Bergen, Norway

*
*   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/
```