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

Re: st: RE: Random effects hierarchical models


From   Joseph Coveney <jcoveney@bigplanet.com>
To   Statalist <statalist@hsphsun2.harvard.edu>
Subject   Re: st: RE: Random effects hierarchical models
Date   Wed, 10 Aug 2005 17:17:23 +0900

Geoff Jones wrote:

I tried gllamm on a toy data set (pasted below). Rather than the variance
components I hoped for, it gave the output below, including a mysterious s1
which wasnt in the data set. Am I being stupid? Are my data not set up
properly? Im running Stata 8.2.   Geoff

. gllamm chld, i(hh psu)

--------------------------------------------------------------------------------

That's strange.  When I typed that command with your dataset (running Stata 
Release 9), I get variance components.  Is -gllamm- is up-to-date on your 
machine?

Joseph Coveney

. clear

. set more off

. input byte psu byte hh float chld

          psu        hh       chld
  1. 1       1       -.0002322
  2. 1       2       -.8776832
[redacted]
 36. end

. gllamm chld, i(hh psu)

Iteration 0:   log likelihood =  -57.81778
[redacted]
Iteration 5:   log likelihood = -54.055786

number of level 1 units = 35
number of level 2 units = 24
number of level 3 units = 4

Condition Number = 2.2457844

gllamm model

log likelihood = -54.055786

------------------------------------------------------------------------------
        chld |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+----------------------------------------------------------------
       _cons |    .720011   .2974915     2.42   0.016     .1369383
1.303084
------------------------------------------------------------------------------

Variance at level 1
------------------------------------------------------------------------------

  .46898117 (.21782082)

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


***level 2 (hh)

    var(1): .82957123 (.32631427)

***level 3 (psu)

    var(1): .56662551 (.48673927)
------------------------------------------------------------------------------



. exit

end of do-file

.

. which gllamm
c:\Program Files\Stata9\ado\STBplus\g\gllamm.ado
*! version 2.3.10 SRH 4 jan 2005

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