RE: st: can gllamm fit this?

 From "Maarten Buis" To Subject RE: st: can gllamm fit this? Date Tue, 11 Oct 2005 10:12:11 +0200

```I had the same idea as Svend, though coming from a different discipline. In my parlance I would say that the model you are trying to estimate is recursive, so there is no need to simultaneously estimate equation 1 and 2. Consequently you can just estimate two separate logistic regressions as Svend suggested, and there is no need to use GLLAMM.

Hope this helps,
Maarten

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of Svend Juul
Sent: maandag 10 oktober 2005 23:23
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: can gllamm fit this?

Bill wrote:

I have three binary variables, say x1, x2, and x3.  I want to fit two
logistic regression models simultaneously, x2=b12*x1 and
x3=b13*x1+b23*x2.  I want to fit them simultaneously in order to
calculate the indirect effect proportion = (indirect effect)/(total
effect) = (b12*b23)/(b12*b23 + b13).  Because the data are not
continuous, I cannot use pathreg.  I believe this model falls in the
category of latent variable (SEM) using manifest variables, which I've
specifically how to specify the B matrix, or if I even need a B matrix.
The documentation is pretty tough to work through.
-----------------------------------

This isn't an answer, but a speculation from an epidemiologist who
is used to think: "What is the question (or hypothesis)?"

Bill's two equations can be put graphically:
x1 --------------->
|                      x3
------> x2 ------>

It looks like what we epidemiologists call the confounding triangle
(the untriangular look is only due to a practical shortcoming of
text mode). However, x2 should not be considered a confounder since
it may be in the causal pathway from x1 to x3. The corresponding
questions are:
1. What is the overall (crude) effect of x1 on x3?
2. How much is explained by x2 being a consequence of x1 and a cause of x3?

Example:
Does smoking (x1) affect birthweight (x3)?
Does smoking (x1) affect duration of pregnancy (x2)?
Does duration of pregnancy (x2) affect birthweight (x3)?

The crude x1-x3 association might reflect the x1 -> x2 -> x3
effects only, but there might also be a direct x1 -> x3 effect.

The primary tool is -cc- (see [ST] cc). It gives the crude (x1 -> x3)
odds ratio estimate and the adjusted x1 -> x3 estimate, i.e. the odds
ratio estimate remaining when the x1 -> x2 -> x3 effect has been
accounted for. (Actually, it seems that smoking increases the risk of
preterm birth, but that it has an effect on birthweight beyond that).

With -cc- you would:
. cc x3 x1
. xx x3 x1 , by(x2)

With -logistic- you would:
. logistic x3 x1
. logistic x3 x1 x2

I don't know if this is useful to you. But I have the feeling that
we are trying to invent the same wheel in various disciplines.

Svend

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