------------------------------------------------------------------------------------------------------------------------------------------------------
name: STATA_Chapter5
log: C:\Dropbox\PilesOfVariance\Chapter5\STATA\STATA_Chapter5_Output.smcl
log type: smcl
opened on: 12 Jan 2015, 10:36:26
.
. display as result "Chapter 5 Example: Means by Wave for outcome"
Chapter 5 Example: Means by Wave for outcome
. tabulate wave, summarize(outcome)
wave: | Summary of outcome: Test Score
Occasion | Outcome
(1-4) | Mean Std. Dev. Freq.
------------+------------------------------------
1 | 10.4048 1.5368152 25
2 | 11.8576 2.2113255 25
3 | 13.5844 2.4934248 25
4 | 15.5516 3.4269042 25
------------+------------------------------------
Total | 12.8496 3.1384687 100
.
. display as result "Eq 5.1: Empty Means, Random Intercept Model"
Eq 5.1: Empty Means, Random Intercept Model
. mixed outcome , ///
> || personid: , variance reml covariance(unstructured) ///
> residuals(independent,t(wave)),
Note: single-variable random-effects specification in personid equation; covariance structure set to identity
Note: t() not required for this residual structure; ignored
Performing EM optimization:
Performing gradient-based optimization:
Iteration 0: log restricted-likelihood = -251.11191
Iteration 1: log restricted-likelihood = -251.11191
Computing standard errors:
Mixed-effects REML regression Number of obs = 100
Group variable: personid Number of groups = 25
Obs per group: min = 4
avg = 4.0
max = 4
Wald chi2(0) = .
Log restricted-likelihood = -251.11191 Prob > chi2 = .
------------------------------------------------------------------------------
outcome | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_cons | 12.8496 .4310792 29.81 0.000 12.0047 13.6945
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
personid: Identity |
var(_cons) | 2.881871 1.37169 1.133773 7.325256
-----------------------------+------------------------------------------------
var(Residual) | 7.055445 1.152149 5.122993 9.716839
------------------------------------------------------------------------------
LR test vs. linear regression: chibar2(01) = 9.79 Prob >= chibar2 = 0.0009
. estat ic, n(25),
Akaike's information criterion and Bayesian information criterion
-----------------------------------------------------------------------------
Model | Obs ll(null) ll(model) df AIC BIC
-------------+---------------------------------------------------------------
. | 25 . -251.1119 3 508.2238 511.8804
-----------------------------------------------------------------------------
Note: N=25 used in calculating BIC
. estat icc,
Intraclass correlation
------------------------------------------------------------------------------
Level | ICC Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
personid | .290005 .1100872 .125289 .5380638
------------------------------------------------------------------------------
. estat recovariance, relevel(personid),
Random-effects covariance matrix for level personid
| _cons
-------------+-----------
_cons | 2.881871
. estat recovariance, relevel(personid) correlation,
Random-effects correlation matrix for level personid
| _cons
-------------+-----------
_cons | 1
. estat wcorrelation, covariance,
Covariances for personid = 1:
obs | 1 2 3 4
-------------+--------------------------------
1 | 9.937
2 | 2.882 9.937
3 | 2.882 2.882 9.937
4 | 2.882 2.882 2.882 9.937
. estat wcorrelation,
Standard deviations and correlations for personid = 1:
Standard deviations:
obs | 1 2 3 4
-------------+--------------------------------
sd | 3.152 3.152 3.152 3.152
Correlations:
obs | 1 2 3 4
-------------+--------------------------------
1 | 1.000
2 | 0.290 1.000
3 | 0.290 0.290 1.000
4 | 0.290 0.290 0.290 1.000
.
. display as result "Eq 5.3: Fixed Linear Time, Random Intercept Model"
Eq 5.3: Fixed Linear Time, Random Intercept Model
. mixed outcome c.time, ///
> || personid: , variance reml covariance(unstructured) ///
> residuals(independent,t(wave)),
Note: single-variable random-effects specification in personid equation; covariance structure set to identity
Note: t() not required for this residual structure; ignored
Performing EM optimization:
Performing gradient-based optimization:
Iteration 0: log restricted-likelihood = -207.54771
Iteration 1: log restricted-likelihood = -207.54771
Computing standard errors:
Mixed-effects REML regression Number of obs = 100
Group variable: personid Number of groups = 25
Obs per group: min = 4
avg = 4.0
max = 4
Wald chi2(1) = 169.57
Log restricted-likelihood = -207.54771 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
outcome | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
time | 1.71672 .1318342 13.02 0.000 1.45833 1.97511
_cons | 10.27452 .4742731 21.66 0.000 9.344962 11.20408
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
personid: Identity |
var(_cons) | 4.102601 1.344078 2.158699 7.796982
-----------------------------+------------------------------------------------
var(Residual) | 2.172533 .3571621 1.57409 2.998493
------------------------------------------------------------------------------
LR test vs. linear regression: chibar2(01) = 51.12 Prob >= chibar2 = 0.0000
. estat ic, n(25),
Akaike's information criterion and Bayesian information criterion
-----------------------------------------------------------------------------
Model | Obs ll(null) ll(model) df AIC BIC
-------------+---------------------------------------------------------------
. | 25 . -207.5477 4 423.0954 427.9709
-----------------------------------------------------------------------------
Note: N=25 used in calculating BIC
. estat recovariance, relevel(personid),
Random-effects covariance matrix for level personid
| _cons
-------------+-----------
_cons | 4.102601
. estat recovariance, relevel(personid) correlation,
Random-effects correlation matrix for level personid
| _cons
-------------+-----------
_cons | 1
. estat wcorrelation, covariance,
Covariances for personid = 1:
obs | 1 2 3 4
-------------+--------------------------------
1 | 6.275
2 | 4.103 6.275
3 | 4.103 4.103 6.275
4 | 4.103 4.103 4.103 6.275
. estat wcorrelation,
Standard deviations and correlations for personid = 1:
Standard deviations:
obs | 1 2 3 4
-------------+--------------------------------
sd | 2.505 2.505 2.505 2.505
Correlations:
obs | 1 2 3 4
-------------+--------------------------------
1 | 1.000
2 | 0.654 1.000
3 | 0.654 0.654 1.000
4 | 0.654 0.654 0.654 1.000
. * Intercept at Time=0
. lincom _cons*1 + c.time*0
( 1) [outcome]_cons = 0
------------------------------------------------------------------------------
outcome | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | 10.27452 .4742731 21.66 0.000 9.344962 11.20408
------------------------------------------------------------------------------
. * Intercept at Time=1
. lincom _cons*1 + c.time*1
( 1) [outcome]time + [outcome]_cons = 0
------------------------------------------------------------------------------
outcome | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | 11.99124 .4360899 27.50 0.000 11.13652 12.84596
------------------------------------------------------------------------------
. * Intercept at Time=2
. lincom _cons*1 + c.time*2
( 1) 2*[outcome]time + [outcome]_cons = 0
------------------------------------------------------------------------------
outcome | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | 13.70796 .4360899 31.43 0.000 12.85324 14.56268
------------------------------------------------------------------------------
. * Intercept at Time=3
. lincom _cons*1 + c.time*3
( 1) 3*[outcome]time + [outcome]_cons = 0
------------------------------------------------------------------------------
outcome | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | 15.42468 .4742731 32.52 0.000 14.49512 16.35424
------------------------------------------------------------------------------
. estimates store FitFixLin,
.
. display as result "Eq 5.5: Random Linear Time Model"
Eq 5.5: Random Linear Time Model
. mixed outcome c.time, ///
> || personid: time, variance reml covariance(unstructured) ///
> residuals(independent,t(wave)),
Note: t() not required for this residual structure; ignored
Performing EM optimization:
Performing gradient-based optimization:
Iteration 0: log restricted-likelihood = -183.37075
Iteration 1: log restricted-likelihood = -183.37075
Computing standard errors:
Mixed-effects REML regression Number of obs = 100
Group variable: personid Number of groups = 25
Obs per group: min = 4
avg = 4.0
max = 4
Wald chi2(1) = 70.26
Log restricted-likelihood = -183.37075 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
outcome | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
time | 1.71672 .2048056 8.38 0.000 1.315308 2.118132
_cons | 10.27452 .3317511 30.97 0.000 9.6243 10.92474
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
personid: Unstructured |
var(time) | .908907 .3040016 .4718659 1.750735
var(_cons) | 2.262429 .8002807 1.131052 4.525508
cov(time,_cons) | .0545357 .3506837 -.6327918 .7418632
-----------------------------+------------------------------------------------
var(Residual) | .6986308 .1397261 .4720712 1.033923
------------------------------------------------------------------------------
LR test vs. linear regression: chi2(3) = 99.47 Prob > chi2 = 0.0000
Note: LR test is conservative and provided only for reference.
. estat ic, n(25),
Akaike's information criterion and Bayesian information criterion
-----------------------------------------------------------------------------
Model | Obs ll(null) ll(model) df AIC BIC
-------------+---------------------------------------------------------------
. | 25 . -183.3708 6 378.7415 386.0548
-----------------------------------------------------------------------------
Note: N=25 used in calculating BIC
. estat recovariance, relevel(personid),
Random-effects covariance matrix for level personid
| time _cons
-------------+----------------------
time | .908907
_cons | .0545357 2.262429
. estat recovariance, relevel(personid) correlation,
Random-effects correlation matrix for level personid
| time _cons
-------------+----------------------
time | 1
_cons | .0380306 1
. estat wcorrelation, covariance,
Covariances for personid = 1:
obs | 1 2 3 4
-------------+--------------------------------
1 | 2.961
2 | 2.317 3.979
3 | 2.372 4.244 6.815
4 | 2.426 5.207 7.989 11.468
. estat wcorrelation,
Standard deviations and correlations for personid = 1:
Standard deviations:
obs | 1 2 3 4
-------------+--------------------------------
sd | 1.721 1.995 2.611 3.387
Correlations:
obs | 1 2 3 4
-------------+--------------------------------
1 | 1.000
2 | 0.675 1.000
3 | 0.528 0.815 1.000
4 | 0.416 0.771 0.904 1.000
. * Intercept at Time=0
. lincom _cons*1 + c.time*0
( 1) [outcome]_cons = 0
------------------------------------------------------------------------------
outcome | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | 10.27452 .3317511 30.97 0.000 9.6243 10.92474
------------------------------------------------------------------------------
. * Intercept at Time=1
. lincom _cons*1 + c.time*1
( 1) [outcome]time + [outcome]_cons = 0
------------------------------------------------------------------------------
outcome | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | 11.99124 .3736306 32.09 0.000 11.25894 12.72354
------------------------------------------------------------------------------
. * Intercept at Time=2
. lincom _cons*1 + c.time*2
( 1) 2*[outcome]time + [outcome]_cons = 0
------------------------------------------------------------------------------
outcome | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | 13.70796 .5030224 27.25 0.000 12.72205 14.69387
------------------------------------------------------------------------------
. * Intercept at Time=3
. lincom _cons*1 + c.time*3
( 1) 3*[outcome]time + [outcome]_cons = 0
------------------------------------------------------------------------------
outcome | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | 15.42468 .6710841 22.98 0.000 14.10938 16.73998
------------------------------------------------------------------------------
. estimates store FitRandLin,
. lrtest FitRandLin FitFixLin,
Likelihood-ratio test LR chi2(2) = 48.35
(Assumption: FitFixLin nested in FitRandLin) Prob > chi2 = 0.0000
Note: The reported degrees of freedom assumes the null hypothesis is not on the boundary of the parameter space. If this is not true, then the
reported test is conservative.
Note: LR tests based on REML are valid only when the fixed-effects specification is identical for both models.
.
. display as result "Ch 5: Saturated Means, Unstructured Variance Model"
Ch 5: Saturated Means, Unstructured Variance Model
. display as result "ANSWER KEY for both sides of the model"
ANSWER KEY for both sides of the model
. mixed outcome i.wave, ///
> || personid: , noconstant variance reml covariance(unstructured) ///
> residuals(unstructured,t(wave)),
Obtaining starting values by EM:
Performing gradient-based optimization:
Iteration 0: log restricted-likelihood = -231.02623 (not concave)
Iteration 1: log restricted-likelihood = -201.02114 (not concave)
Iteration 2: log restricted-likelihood = -186.34703
Iteration 3: log restricted-likelihood = -180.84004
Iteration 4: log restricted-likelihood = -177.35889
Iteration 5: log restricted-likelihood = -176.88193
Iteration 6: log restricted-likelihood = -176.87671
Iteration 7: log restricted-likelihood = -176.87671
Computing standard errors:
Mixed-effects REML regression Number of obs = 100
Group variable: personid Number of groups = 25
Obs per group: min = 4
avg = 4.0
max = 4
Wald chi2(3) = 71.58
Log restricted-likelihood = -176.87671 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
outcome | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
wave |
2 | 1.4528 .2591085 5.61 0.000 .9449567 1.960643
3 | 3.1796 .4320114 7.36 0.000 2.332873 4.026327
4 | 5.1468 .6087591 8.45 0.000 3.953654 6.339946
|
_cons | 10.4048 .307363 33.85 0.000 9.80238 11.00722
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
personid: (empty) |
-----------------------------+------------------------------------------------
Residual: Unstructured |
var(e1) | 2.3618 .6817836 1.341299 4.158727
var(e2) | 4.889959 1.411524 2.77715 8.610157
var(e3) | 6.217168 1.794663 3.530878 10.94719
var(e4) | 11.74367 3.38998 6.669487 20.67833
cov(e1,e2) | 2.786664 .8970521 1.028475 4.544854
cov(e1,e3) | 1.95656 .8781568 .2354045 3.677716
cov(e1,e4) | 2.42039 1.182983 .1017866 4.738994
cov(e2,e3) | 4.04396 1.395621 1.308593 6.779328
cov(e2,e4) | 5.552549 1.917467 1.794383 9.310715
cov(e3,e4) | 7.799419 2.361417 3.171126 12.42771
------------------------------------------------------------------------------
LR test vs. linear regression: chi2(9) = 108.30 Prob > chi2 = 0.0000
Note: The reported degrees of freedom assumes the null hypothesis is not on the boundary of the parameter space. If this is not true, then the
reported test is conservative.
. estat ic, n(25),
Akaike's information criterion and Bayesian information criterion
-----------------------------------------------------------------------------
Model | Obs ll(null) ll(model) df AIC BIC
-------------+---------------------------------------------------------------
. | 25 . -176.8767 14 381.7534 398.8177
-----------------------------------------------------------------------------
Note: N=25 used in calculating BIC
. estat wcorrelation, covariance,
Covariances for personid = 1:
wave | 1 2 3 4
-------------+--------------------------------
1 | 2.362
2 | 2.787 4.890
3 | 1.957 4.044 6.217
4 | 2.420 5.553 7.799 11.744
. estat wcorrelation,
Standard deviations and correlations for personid = 1:
Standard deviations:
wave | 1 2 3 4
-------------+--------------------------------
sd | 1.537 2.211 2.493 3.427
Correlations:
wave | 1 2 3 4
-------------+--------------------------------
1 | 1.000
2 | 0.820 1.000
3 | 0.511 0.733 1.000
4 | 0.460 0.733 0.913 1.000
. contrast i.wave,
Contrasts of marginal linear predictions
Margins : asbalanced
------------------------------------------------
| df chi2 P>chi2
-------------+----------------------------------
outcome |
wave | 3 71.58 0.0000
------------------------------------------------
. margins i.wave,
Adjusted predictions Number of obs = 100
Expression : Linear prediction, fixed portion, predict()
------------------------------------------------------------------------------
| Delta-method
| Margin Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
wave |
1 | 10.4048 .307363 33.85 0.000 9.80238 11.00722
2 | 11.8576 .442265 26.81 0.000 10.99078 12.72442
3 | 13.5844 .498685 27.24 0.000 12.607 14.5618
4 | 15.5516 .6853809 22.69 0.000 14.20828 16.89492
------------------------------------------------------------------------------
. margins i.wave, pwcompare(pveffects)
Pairwise comparisons of adjusted predictions
Expression : Linear prediction, fixed portion, predict()
-----------------------------------------------------
| Delta-method Unadjusted
| Contrast Std. Err. z P>|z|
-------------+---------------------------------------
wave |
2 vs 1 | 1.4528 .2591085 5.61 0.000
3 vs 1 | 3.1796 .4320114 7.36 0.000
4 vs 1 | 5.1468 .6087591 8.45 0.000
3 vs 2 | 1.7268 .3475173 4.97 0.000
4 vs 2 | 3.694 .4702567 7.86 0.000
4 vs 3 | 1.9672 .3073763 6.40 0.000
-----------------------------------------------------
.
. display as result "Ch 5: Random Linear Time Model with AR1 R Matrix"
Ch 5: Random Linear Time Model with AR1 R Matrix
. mixed outcome c.time, ///
> || personid: time, variance reml covariance(unstructured) ///
> residuals(ar1,t(wave)),
Obtaining starting values by EM:
Performing gradient-based optimization:
Iteration 0: log restricted-likelihood = -183.37075
Iteration 1: log restricted-likelihood = -183.3697
Iteration 2: log restricted-likelihood = -183.3697
Computing standard errors:
Mixed-effects REML regression Number of obs = 100
Group variable: personid Number of groups = 25
Obs per group: min = 4
avg = 4.0
max = 4
Wald chi2(1) = 70.36
Log restricted-likelihood = -183.3697 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
outcome | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
time | 1.716677 .2046619 8.39 0.000 1.315547 2.117807
_cons | 10.27625 .3308225 31.06 0.000 9.627851 10.92465
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
personid: Unstructured |
var(time) | .9015393 .3458668 .4250396 1.912229
var(_cons) | 2.221615 1.218067 .7585289 6.506772
cov(time,_cons) | .069484 .4841568 -.8794458 1.018414
-----------------------------+------------------------------------------------
Residual: AR(1) |
rho | .0255942 .5687964 -.7968604 .8148013
var(e) | .7193141 .4968642 .1857605 2.785375
------------------------------------------------------------------------------
LR test vs. linear regression: chi2(4) = 99.48 Prob > chi2 = 0.0000
Note: LR test is conservative and provided only for reference.
. estat ic, n(25),
Akaike's information criterion and Bayesian information criterion
-----------------------------------------------------------------------------
Model | Obs ll(null) ll(model) df AIC BIC
-------------+---------------------------------------------------------------
. | 25 . -183.3697 7 380.7394 389.2715
-----------------------------------------------------------------------------
Note: N=25 used in calculating BIC
. estat recovariance, relevel(personid),
Random-effects covariance matrix for level personid
| time _cons
-------------+----------------------
time | .9015393
_cons | .069484 2.221615
. estat recovariance, relevel(personid) correlation,
Random-effects correlation matrix for level personid
| time _cons
-------------+----------------------
time | 1
_cons | .0490974 1
. estat wcorrelation, covariance,
Covariances for personid = 1:
wave | 1 2 3 4
-------------+--------------------------------
1 | 2.941 2.310 2.361 2.430
2 | 2.310 3.981 4.252 5.205
3 | 2.361 4.252 6.825 7.997
4 | 2.430 5.205 7.997 11.472
. estat wcorrelation,
Standard deviations and correlations for personid = 1:
Standard deviations:
wave | 1 2 3 4
-------------+--------------------------------
sd | 1.715 1.995 2.612 3.387
Correlations:
wave | 1 2 3 4
-------------+--------------------------------
1 | 1.000
2 | 0.675 1.000
3 | 0.527 0.816 1.000
4 | 0.418 0.770 0.904 1.000
. estimates store FitRandLinAR1,
. lrtest FitRandLinAR1 FitRandLin,
Likelihood-ratio test LR chi2(1) = 0.00
(Assumption: FitRandLin nested in FitRandLinAR1) Prob > chi2 = 0.9634
Note: LR tests based on REML are valid only when the fixed-effects specification is identical for both models.
.
. display as result "Ch 5: Random Linear Time Model with TOEP2 R Matrix"
Ch 5: Random Linear Time Model with TOEP2 R Matrix
. mixed outcome c.time, ///
> || personid: time, variance reml covariance(unstructured) ///
> residuals(toeplitz1,t(wave)),
Obtaining starting values by EM:
Performing gradient-based optimization:
Iteration 0: log restricted-likelihood = -183.37075
Iteration 1: log restricted-likelihood = -183.37001
Iteration 2: log restricted-likelihood = -183.37001
Computing standard errors:
Mixed-effects REML regression Number of obs = 100
Group variable: personid Number of groups = 25
Obs per group: min = 4
avg = 4.0
max = 4
Wald chi2(1) = 70.33
Log restricted-likelihood = -183.37001 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
outcome | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
time | 1.71669 .2047041 8.39 0.000 1.315477 2.117903
_cons | 10.2757 .3311023 31.03 0.000 9.626749 10.92465
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
personid: Unstructured |
var(time) | .9038457 .3309504 .4409811 1.852544
var(_cons) | 2.234488 1.078639 .8675279 5.755362
cov(time,_cons) | .0648451 .4406703 -.7988528 .9285431
-----------------------------+------------------------------------------------
Residual: Toeplitz(1) |
cov1 | .0124363 .3232059 -.6210356 .6459082
var(e) | .7125808 .3908035 .2432239 2.08767
------------------------------------------------------------------------------
LR test vs. linear regression: chi2(4) = 99.48 Prob > chi2 = 0.0000
Note: LR test is conservative and provided only for reference.
. estat ic, n(25),
Akaike's information criterion and Bayesian information criterion
-----------------------------------------------------------------------------
Model | Obs ll(null) ll(model) df AIC BIC
-------------+---------------------------------------------------------------
. | 25 . -183.37 7 380.74 389.2721
-----------------------------------------------------------------------------
Note: N=25 used in calculating BIC
. estat recovariance, relevel(personid),
Random-effects covariance matrix for level personid
| time _cons
-------------+----------------------
time | .9038457
_cons | .0648451 2.234488
. estat recovariance, relevel(personid) correlation,
Random-effects correlation matrix for level personid
| time _cons
-------------+----------------------
time | 1
_cons | .045629 1
. estat wcorrelation, covariance,
Covariances for personid = 1:
wave | 1 2 3 4
-------------+--------------------------------
1 | 2.947 2.312 2.364 2.429
2 | 2.312 3.981 4.249 5.205
3 | 2.364 4.249 6.822 7.994
4 | 2.429 5.205 7.994 11.471
. estat wcorrelation,
Standard deviations and correlations for personid = 1:
Standard deviations:
wave | 1 2 3 4
-------------+--------------------------------
sd | 1.717 1.995 2.612 3.387
Correlations:
wave | 1 2 3 4
-------------+--------------------------------
1 | 1.000
2 | 0.675 1.000
3 | 0.527 0.815 1.000
4 | 0.418 0.770 0.904 1.000
. estimates store FitRandLinTOEP2,
. lrtest FitRandLinTOEP2 FitRandLin,
Likelihood-ratio test LR chi2(1) = 0.00
(Assumption: FitRandLin nested in FitRandLinTO~2) Prob > chi2 = 0.9692
Note: LR tests based on REML are valid only when the fixed-effects specification is identical for both models.
.
. ****** END CHAPTER 5 MODELS ******
.
. * Close log
. log close STATA_Chapter5
name: STATA_Chapter5
log: C:\Dropbox\PilesOfVariance\Chapter5\STATA\STATA_Chapter5_Output.smcl
log type: smcl
closed on: 12 Jan 2015, 10:36:32
------------------------------------------------------------------------------------------------------------------------------------------------------