Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: GLLAMM


From   "Stephen Soldz" <ssoldz@soldzresearch.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: GLLAMM
Date   Tue, 24 Sep 2002 17:36:55 -0400

I'm trying to use GLLAMM for structural equation modeling with a binary
outcome (school attendance 12 months after entering substance abuse
treatment). I'm primarily interested in a path model, with manifest
variables, though there may be one latent variable.  What I really need to
be able to do is translate a path diagram into gllamm code.  I've been going
over the manual, but can't see how to do it.  I don't really have a
multilevel problem, so the i() variable is just client id.

Even for an extremely simple model, predicting school attendance at 12
months from attendance at admission, my model doesn't converge, whereas a
simple logistic model does.

***********************

----------------------------------------------------------------------------
---
       log:  C:\Data\MIST\MISTStata\glamm_test.log
  log type:  text
 opened on:  24 Sep 2002, 17:08:28

.
. logit inschool12 inschool,

Iteration 0:   log likelihood =  -111.1575
Iteration 1:   log likelihood = -104.90761
Iteration 2:   log likelihood = -104.86177
Iteration 3:   log likelihood = -104.86177

Logit estimates                                   Number of obs   =
175
                                                  LR chi2(1)      =
12.59
                                                  Prob > chi2     =
0.0004
Log likelihood = -104.86177                       Pseudo R2       =
0.0566

----------------------------------------------------------------------------
--
  inschool12 |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
    inschool |   1.203973   .3422187     3.52   0.000     .5332364
1.874709
       _cons |   -.071459   .2674319    -0.27   0.789    -.5956158
.4526978
----------------------------------------------------------------------------
--

.
. gllamm inschool12 inschool, i(twistid) family(binom) link(logit) dots
nip(20)

................Iteration 0:   log likelihood = -104.90004
.....................................Iteration 1:   log likelihood
= -104.86177
>   (not concave)
............................................................................
...
> ..............................numerical derivatives are approximate
flat or discontinuous region encountered
............................................................................
...
> .........................numerical derivatives are approximate
flat or discontinuous region encountered
............................................................................
...
> ...........................numerical derivatives are approximate
flat or discontinuous region encountered
....Iteration 2:   log likelihood =  77082.381  (not concave)
............................................................................
...
> ..............................numerical derivatives are approximate
flat or discontinuous region encountered
............................................................................
...
> .........................numerical derivatives are approximate
flat or discontinuous region encountered
............................................................................
...
> ...........................numerical derivatives are approximate
flat or discontinuous region encountered
....Iteration 3:   log likelihood =  77161.125  (not concave)
............................................................................
...
> ........................................................numerical
derivatives
>  are approximate
flat or discontinuous region encountered
............................................................................
...
> ...........................numerical derivatives are approximate
flat or discontinuous region encountered
....Iteration 4:   log likelihood =  77163.479  (not concave)
............................................................................
...
> ...............................numerical derivatives are approximate
flat or discontinuous region encountered
............................................................................
...
> .........................numerical derivatives are approximate
flat or discontinuous region encountered
....................................................Iteration 5:   log
likeliho
> od =  77163.479  (not concave)

number of level 1 units = 175
number of level 2 units = 175

Condition Number could not be computed

gllamm model

log likelihood = 77163.479

----------------------------------------------------------------------------
--
  inschool12 |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
    inschool |   4.53e+07   811588.2    55.86   0.000     4.37e+07
4.69e+07
       _cons |  -1.39e+08    7423013   -18.72
0.000    -1.54e+08   -1.24e+08
----------------------------------------------------------------------------
--


Variances and covariances of random effects
----------------------------------------------------------------------------
--


***level 2 (twistid)

    var(1): 4.143e+13 (0)
----------------------------------------------------------------------------
--



.
. log close
       log:  C:\Data\MIST\MISTStata\glamm_test.log
  log type:  text
 closed on:  24 Sep 2002, 17:12:50
----------------------------------------------------------------------------
---

 Using adaptive quadrature seems to improve things;


 . gllamm inschool12 inschool, i(twistid) family(binom) link(logit) dots
nip(20)
 >  adapt
 ....
 ........................................Iteration 0:   log likelihood
= -104.86
 > 177
 ..................................................................Iteration
1:
 >   log likelihood = -104.86177  (not concave)

 number of level 1 units = 175
 number of level 2 units = 175

 Condition Number could not be computed

 gllamm model

 log likelihood = -104.86177

 ---------------------------------------------------------------------------
---
   inschool12 |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
 -------------+-------------------------------------------------------------
---
     inschool |   1.249865   .3549912     3.52   0.000     .5540955
1.945636
        _cons |  -.0745689   .2784373    -0.27   0.789    -.6202959
.4711581
 ---------------------------------------------------------------------------
---


 Variances and covariances of random effects
 ---------------------------------------------------------------------------
---


 ***level 2 (twistid)

     var(1): .17140917 (0)
 ---------------------------------------------------------------------------
---


***********

Among other questions, what is the meaning of the level 2 variance, and why
are the coefficients different than the simple logit model.

Any guidance apreciated.

Stephen Soldz
Boston Graduate School of Psychoanalysis
1581 Beacon St.
Brookline, MA 02146
(617) 277-3915

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



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index