Table 6.5, page 221 using external_pp.dta.
Model A:
xtreg external, i(id) mle
Iteration 0: log likelihood = -1005.1321
Iteration 1: log likelihood = -1005.1265
Random-effects ML regression Number of obs = 270
Group variable (i): id Number of groups = 45
Random effects u_i ~ Gaussian Obs per group: min = 6
avg = 6.0
max = 6
Wald chi2(0) = 0.00
Log likelihood = -1005.1265 Prob > chi2 = .
------------------------------------------------------------------------------
external | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_cons | 12.96296 1.484129 8.73 0.000 10.05412 15.8718
-------------+----------------------------------------------------------------
/sigma_u | 9.349753 1.119012 8.36 0.000 7.156529 11.54298
/sigma_e | 8.378721 .3949146 21.22 0.000 7.604702 9.152739
-------------+----------------------------------------------------------------
rho | .5546087 .0646797 .4272182 .6765557
------------------------------------------------------------------------------
Likelihood-ratio test of sigma_u=0: chibar2(01)= 122.23 Prob>=chibar2 = 0.000
di 9.349753^2
87.417881
di 8.378721^2 70.202966
Model B:
gen cons = 1
eq int: cons
eq slope: time
gllamm external time, i(id) eqs(int slope) nrf(2) nip(8) adapt
log likelihood = -995.87718
------------------------------------------------------------------------------
external | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
time | -.1329505 .4183084 -0.32 0.751 -.9528199 .6869189
_cons | 13.29615 1.844215 7.21 0.000 9.681556 16.91074
------------------------------------------------------------------------------
Variance at level 1
------------------------------------------------------------------------------
53.566484 (5.6318023)
Variances and covariances of random effects
------------------------------------------------------------------------------
***level 2 (id)
var(1): 124.99198 (32.599481)
cov(2,1): -12.724893 (6.0683818) cor(2,1): -.51879351
var(2): 4.8132346 (1.6962903)
------------------------------------------------------------------------------
Model C:
gen time2 = time*time
eq quatrm: time2
gllamm external time time2, i(id) eqs(int slope quatrm) nrf(3) nip(8) nocorr adapt
log likelihood = -990.59025
------------------------------------------------------------------------------
external | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
time | -1.152651 .934197 -1.23 0.217 -2.983644 .6783414
time2 | .2044126 .2028867 1.01 0.314 -.1932381 .6020633
_cons | 14.0147 1.68868 8.30 0.000 10.70495 17.32446
------------------------------------------------------------------------------
Variance at level 1
------------------------------------------------------------------------------
49.549878 (5.2333794)
Variances and covariances of random effects
------------------------------------------------------------------------------
***level 2 (id)
var(1): 87.617351 (26.780307)
cov(2,1): 15.591678 (8.624387)
var(2): 3.2596014 (4.215175)
cov(3,1): -4.6378797 (2.0152581)
cov(3,2): -1.1715345 (1.3428832)
var(3): .52506624 (.3711975)
------------------------------------------------------------------------------
