Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Weihao Yin" <[email protected]> |

To |
<[email protected]> |

Subject |
st: Mysterious Output Given by GLLAMM for Multiple-Equation Generalized Linear Model |

Date |
Thu, 12 Jul 2012 14:55:40 -0400 |

Hi, I am learning to use GLLAMM to estimate a multiple-equation Generalized Linear Model, which jointly models binary and count data. The dataset I use is about the condition and length of hospital stay for 32 herniorrhaphy patients. The dataset is freely available online. The response variables are [leave] and [los], which denote the condition of the patient upon leaving the operating room and the length of hospital stay after the operation. One of the two covariate is [OKstatus] which distinguishes patients based on their post-operative physical status with "1" indicating better status. The other is patient's age. The model consists of two equations: one is logit model for [leave] and the other is a Poisson model for [los]. The correlation between the two is captured using a common random effect. Mathematically, it is written as: g1([leave]) = b01+b11*[age]+b12*[OKstatus]+u+epsilon1 g2([los]) = b02+b12*[age]+b22*[OKstatus]+u+epsilon2 where u is the random effect and epsilon1&2 are errors. This example is also used in the SAS GLIMMIX procedure documentation (pp. 203-209). I just try to reproduce the results using GLLAMM. Since the random effect is used as an intercept, I use a constraint to make the factor loadings for both equations on the random effect equal to 1. The GLLAMM gives the following output, in which [d1] is the dummy variable for logit and [d2] is Poisson. -------- Start of the GLLAMM Output -------------- gllamm model with constraints log likelihood = -101.4974201636495 ( 1) [pat1_1l]d2 = 1 ---------------------------------------------------------------------------- -- resp | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+-------------------------------------------------------------- -- age_d1 | -.0774867 .0381989 -2.03 0.043 -.1523552 -.0026181 age_d2 | .0192609 .0073045 2.64 0.008 .0049444 .0335775 okstatus_d1 | -.4720305 1.132692 -0.42 0.677 -2.692066 1.748005 okstatus_d2 | -.193629 .2960872 -0.65 0.513 -.7739493 .3866912 d1 | 5.904778 2.926447 2.02 0.044 .169047 11.64051 d2 | .7702758 .565793 1.36 0.173 -.3386582 1.87921 ---------------------------------------------------------------------------- -- Variances and covariances of random effects ---------------------------------------------------------------------------- -- ***level 2 (patient) var(1): .27889144 (.10479844) loadings for random effect 1 d1: 1 (fixed) d2: 1 (0) ----------------------End of the GLLAMM Output-------------------------------------------------------- The output generally is the same as given by the SAS GLIMMIX. However, when I rerun the model using "allc" option to list all the estimated parameters, here is what I got. ---------------------------------------------------------------------------- -- resp | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+-------------------------------------------------------------- -- resp | age_d1 | -.0774867 .0381989 -2.03 0.043 -.1523552 -.0026181 age_d2 | .0192609 .0073045 2.64 0.008 .0049444 .0335775 okstatus_d1 | -.4720305 1.132692 -0.42 0.677 -2.692066 1.748005 okstatus_d2 | -.193629 .2960872 -0.65 0.513 -.7739493 .3866912 d1 | 5.904778 2.926447 2.02 0.044 .169047 11.64051 d2 | .7702758 .565793 1.36 0.173 -.3386582 1.87921 -------------+-------------------------------------------------------------- -- pat1_1l | d2 | 1 . . . . . -------------+-------------------------------------------------------------- -- pat1_1 | d1 | .5281017 .0992218 5.32 0.000 .3336305 .7225729 ---------------------------------------------------------------------------- -- The last parameter [pat1_1]d1 = 0.5281017. Does anyone know what this parameter is? The first loading "d1" is supposed to be 1 and it is according to the previous output. By the name of it, it seems to be the factor loading. Does GLLAMM estimate the variance of the two epsilons? If it does not, how can I calculate the correlation between the two responses, which is the whole point of this? I know it is a long post but I really need some help. Any input is greatly appreciated. Thanks! Weihao Yin Ph.D Candidate Department of Civil and Environmental Engineering Virginia Polytechnic and State University * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:

- Prev by Date:
**st: alternative to SW in Stata** - Next by Date:
**Re: st: predict after logit** - Previous by thread:
**st: alternative to SW in Stata** - Next by thread:
**st: Re: Mysterious Output Given by GLLAMM for Multiple-Equation Generalized Linear Model** - Index(es):