Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: on GLLAMM and geqs


From   "Liberini, Federica" <F.Liberini@warwick.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: on GLLAMM and geqs
Date   Sun, 5 Jun 2011 18:15:22 +0100

Dear All, 

I am sorry to post this question for the second time, but I am really
struggling in finding an answer in the literature, so I am hoping some
of you could help me. 

I have a probit model with a random coefficient whose equation specifies
it depends also on a dummy variable. So the model looks like

Pr(y_it=1|...)=b_i *x_it '+c_i+u_it
b_i=d_0+d1*z1_i+ d2*z2_i+v_i
c_i=c_0+eta_i

What I am confused about is the right syntax of GLLAMM.  I cannot
understand the difference between these two options:

1)
	eq rcoef: x
	eq unhet: cons

	eq f1: z1 z2

	gllamm y x,  i(id) nrf(2) eqs(rcoef unhet) geqs(f1) fam(binom)
link(probit) adapt 

2)
	gen intz1=z1*x
	gen intz2=z2*x

	eq rcoef: x
	eq unhet: cons

	gllamm y  x  intz1 intz2,  i(id) nrf(2) eqs(rcoef unhet)
fam(binom) link(probit) adapt


My understanding is that 1) and 2) should be equivalent, because the
reduced form from the above model is 

Pr(y_it=1|...)=( d_0+d1*z1_i+ d2*z2_i+v_i )*x_it '+(c_0+eta_i)+u_it

But I estimated them both and the results are slightly different:

1) gives me 

log likelihood = -4361.527
 
------------------------------------------------------------------------
------
      choice |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+----------------------------------------------------------
------
  x |    .408114   .2604192     1.57   0.117    -.1022982    .9185262
(omitted results)
------------------------------------------------------------------------
------
 
 
Variances and covariances of random effects
------------------------------------------------------------------------
------

 
***level 2 (id)
 
    var(1): .06501391 (.06267917)
    cov(2,1): .14149909 (.04572574) cor(2,1): .83115205
 
    var(2): .44580001 (.06440883)
 
Regressions of latent variables on covariates
------------------------------------------------------------------------
------

 
    random effect 1 has 2 covariates:
    z1: -.4020625 (.24564924)
    z2: -.45827059 (.24602441)
------------------------------------------------------------------------
------

Whereas 2) gives me

log likelihood = -4361.5402
 
------------------------------------------------------------------------
------
      choice |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+----------------------------------------------------------
------
             x |    .413023   .2600095     1.59   0.112    -.0965862
.9226323
      intz1 |  -.4050433   .2456187    -1.65   0.099    -.8864472
.0763606
      intz2 |  -.4603647   .2461742    -1.87   0.061    -.9428572
.0221278
(omitted results)
------------------------------------------------------------------------
------
 
 
Variances and covariances of random effects
------------------------------------------------------------------------
------

 
***level 2 (id)
 
    var(1): .07086448 (.06422002)
    cov(2,1): .13851655 (.04482402) cor(2,1): .77885924
 
    var(2): .44633071 (.06433206)
------------------------------------------------------------------------
------


They are very very similar, but they are not the same. Anyone knows why?
(it is useful to know especially because the estimation with syntax as
in 2) allows me to save a lot of computation time)

Many thanks for your help
Best

Federica



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


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