------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  STATA_Chapter6
       log:  C:\Dropbox\PilesOfVariance\Chapter6\STATA\STATA_Chapter6_Output.smcl
  log type:  smcl
 opened on:   6 Jan 2015, 12:52:22


. . display as result "Chapter 6 Example: Means by session for RT outcome" Chapter 6 Example: Means by session for RT outcome

. tabulate session, summarize(rt)

session: | Summary of rt: Response Time in Occasion | Milliseconds (1-6) | Mean Std. Dev. Freq. ------------+------------------------------------ 1 | 1961.8934 549.53193 101 2 | 1815.1724 509.06784 101 3 | 1750.0346 483.08178 101 4 | 1717.7965 466.41575 101 5 | 1707.1757 460.54053 101 6 | 1672.136 443.54613 101 ------------+------------------------------------ Total | 1770.7014 494.08763 606

. . display as result "Ch 6: 0: Saturated Means, Unstructured Variance Model" Ch 6: 0: Saturated Means, Unstructured Variance Model

. display as result "TOTAL ANSWER KEY" TOTAL ANSWER KEY

. mixed rt i.session, /// > || personid: , noconstant variance reml covariance(unstructured) /// > residuals(unstructured,t(session)),

Obtaining starting values by EM:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -4577.7163 (not concave) Iteration 1: log restricted-likelihood = -4203.3431 Iteration 2: log restricted-likelihood = -4161.6274 (not concave) Iteration 3: log restricted-likelihood = -4127.1235 Iteration 4: log restricted-likelihood = -4118.1617 Iteration 5: log restricted-likelihood = -4114.9737 Iteration 6: log restricted-likelihood = -4114.8943 Iteration 7: log restricted-likelihood = -4114.8942

Computing standard errors:

Mixed-effects REML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(5) = 83.60 Log restricted-likelihood = -4114.8942 Prob > chi2 = 0.0000

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- session | 2 | -146.721 29.82087 -4.92 0.000 -205.1688 -88.27315 3 | -211.8587 31.3658 -6.75 0.000 -273.3346 -150.3829 4 | -244.0969 33.64274 -7.26 0.000 -310.0355 -178.1583 5 | -254.7176 35.84557 -7.11 0.000 -324.9737 -184.4616 6 | -289.7574 32.69999 -8.86 0.000 -353.8482 -225.6666 | _cons | 1961.893 54.68037 35.88 0.000 1854.722 2069.065 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: (empty) | -----------------------------+------------------------------------------------ Residual: Unstructured | var(e1) | 301984.3 42695.54 228896.2 398409.8 var(e2) | 259149.5 36634.32 196436.2 341884.5 var(e3) | 233367.6 32989.07 176894.3 307869.9 var(e4) | 217543.3 30752.36 164899 286994.3 var(e5) | 212097.3 29983.2 160769.9 279811.5 var(e6) | 196732.8 27810.84 149124.2 259540.8 cov(e1,e2) | 235658.1 36562.36 163997.1 307319 cov(e1,e3) | 217993.4 34334.82 150698.3 285288.4 cov(e1,e4) | 202606.2 32656.16 138601.3 266611.1 cov(e1,e5) | 192153.1 31760.42 129903.8 254402.4 cov(e1,e6) | 195359.4 31222.49 134164.5 256554.4 cov(e2,e3) | 230216.3 33671.07 164222.2 296210.4 cov(e2,e4) | 213231.3 31897.72 150712.9 275749.6 cov(e2,e5) | 202091.6 30936.96 141456.3 262726.9 cov(e2,e6) | 193267.8 29705.99 135045.2 251490.5 cov(e3,e4) | 205208.6 30461.36 145505.4 264911.8 cov(e3,e5) | 196918.3 29696.25 138714.7 255121.9 cov(e3,e6) | 188604 28530.72 132684.9 244523.2 cov(e4,e5) | 193675.3 28908.89 137014.9 250335.7 cov(e4,e6) | 185320.6 27760.99 130910 239731.1 cov(e5,e6) | 187840 27738.3 133474 242206.1 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(20) = 925.64 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(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4114.894 27 8283.788 8354.397 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat wcorrelation, covariance,

Covariances for personid = 101:

session | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 3.0e+05 2 | 2.4e+05 2.6e+05 3 | 2.2e+05 2.3e+05 2.3e+05 4 | 2.0e+05 2.1e+05 2.1e+05 2.2e+05 5 | 1.9e+05 2.0e+05 2.0e+05 1.9e+05 2.1e+05 6 | 2.0e+05 1.9e+05 1.9e+05 1.9e+05 1.9e+05 2.0e+05

. estat wcorrelation,

Standard deviations and correlations for personid = 101:

Standard deviations:

session | 1 2 3 4 5 6 -------------+------------------------------------------------ sd | 549.531 509.067 483.081 466.415 460.540 443.546

Correlations:

session | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 1.000 2 | 0.842 1.000 3 | 0.821 0.936 1.000 4 | 0.790 0.898 0.911 1.000 5 | 0.759 0.862 0.885 0.902 1.000 6 | 0.802 0.856 0.880 0.896 0.920 1.000

. contrast i.session,

Contrasts of marginal linear predictions

Margins : asbalanced

------------------------------------------------ | df chi2 P>chi2 -------------+---------------------------------- rt | session | 5 83.60 0.0000 ------------------------------------------------

. margins i.session,

Adjusted predictions Number of obs = 606

Expression : Linear prediction, fixed portion, predict()

------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- session | 1 | 1961.893 54.68037 35.88 0.000 1854.722 2069.065 2 | 1815.172 50.65409 35.83 0.000 1715.892 1914.453 3 | 1750.035 48.06839 36.41 0.000 1655.822 1844.247 4 | 1717.796 46.41007 37.01 0.000 1626.834 1808.759 5 | 1707.176 45.82547 37.25 0.000 1617.359 1796.992 6 | 1672.136 44.13445 37.89 0.000 1585.634 1758.638 ------------------------------------------------------------------------------

. margins i.session, pwcompare(pveffects)

Pairwise comparisons of adjusted predictions

Expression : Linear prediction, fixed portion, predict()

----------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. z P>|z| -------------+--------------------------------------- session | 2 vs 1 | -146.721 29.82087 -4.92 0.000 3 vs 1 | -211.8587 31.3658 -6.75 0.000 4 vs 1 | -244.0969 33.64274 -7.26 0.000 5 vs 1 | -254.7176 35.84557 -7.11 0.000 6 vs 1 | -289.7574 32.69999 -8.86 0.000 3 vs 2 | -65.13774 17.82326 -3.65 0.000 4 vs 2 | -97.37592 22.3009 -4.37 0.000 5 vs 2 | -107.9967 25.76813 -4.19 0.000 6 vs 2 | -143.0364 26.20307 -5.46 0.000 4 vs 3 | -32.23819 20.02319 -1.61 0.107 5 vs 3 | -42.85892 22.60911 -1.90 0.058 6 vs 3 | -77.89864 22.8842 -3.40 0.001 5 vs 4 | -10.62073 20.4625 -0.52 0.604 6 vs 4 | -45.66045 20.78531 -2.20 0.028 6 vs 5 | -35.03972 18.11681 -1.93 0.053 -----------------------------------------------------

. . display as result "Ch 6: 1a: Empty Means, E-Only Variance Model" Ch 6: 1a: Empty Means, E-Only Variance Model

. mixed rt , /// > || personid: , noconstant variance reml covariance(unstructured) /// > residuals(independent,t(session)), Note: t() not required for this residual structure; ignored Note: all random-effects equations are empty; model is linear regression

Mixed-effects REML regression Number of obs = 606

Wald chi2(0) = . Log restricted-likelihood = -4614.3025 Prob > chi2 = .

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | 1770.701 20.07094 88.22 0.000 1731.363 1810.04 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ var(Residual) | 244122.6 14024.48 218126.1 273217.3 ------------------------------------------------------------------------------

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4614.303 2 9232.605 9237.835 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat wcorrelation, covariance,

model is linear regression; all observations are independent with standard deviation 494.08763

. estat wcorrelation,

model is linear regression; all observations are independent with standard deviation 494.08763

. . display as result "Ch 6: 1b: Empty Means, Random Intercept Model" Ch 6: 1b: Empty Means, Random Intercept Model

. mixed rt , /// > || personid: , variance reml covariance(unstructured) /// > residuals(independent,t(session)), 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 = -4268.4304 Iteration 1: log restricted-likelihood = -4268.4304

Computing standard errors:

Mixed-effects REML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(0) = . Log restricted-likelihood = -4268.4304 Prob > chi2 = .

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | 1770.701 45.42063 38.98 0.000 1681.679 1859.724 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Identity | var(_cons) | 200883 29471.23 150683.2 267806.8 -----------------------------+------------------------------------------------ var(Residual) | 44899.96 2825.63 39689.76 50794.13 ------------------------------------------------------------------------------ LR test vs. linear regression: chibar2(01) = 691.74 Prob >= chibar2 = 0.0000

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4268.43 3 8542.861 8550.706 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat icc,

Intraclass correlation

------------------------------------------------------------------------------ Level | ICC Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid | .8173187 .0239727 .7655942 .8597208 ------------------------------------------------------------------------------

. estat recovariance, relevel(personid),

Random-effects covariance matrix for level personid

| _cons -------------+----------- _cons | 200883

. estat recovariance, relevel(personid) correlation,

Random-effects correlation matrix for level personid

| _cons -------------+----------- _cons | 1

. estat wcorrelation, covariance,

Covariances for personid = 101:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 2.5e+05 2 | 2.0e+05 2.5e+05 3 | 2.0e+05 2.0e+05 2.5e+05 4 | 2.0e+05 2.0e+05 2.0e+05 2.5e+05 5 | 2.0e+05 2.0e+05 2.0e+05 2.0e+05 2.5e+05 6 | 2.0e+05 2.0e+05 2.0e+05 2.0e+05 2.0e+05 2.5e+05

. estat wcorrelation,

Standard deviations and correlations for personid = 101:

Standard deviations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ sd | 495.765 495.765 495.765 495.765 495.765 495.765

Correlations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 1.000 2 | 0.817 1.000 3 | 0.817 0.817 1.000 4 | 0.817 0.817 0.817 1.000 5 | 0.817 0.817 0.817 0.817 1.000 6 | 0.817 0.817 0.817 0.817 0.817 1.000

. . display as result "Ch 6: 2a: Fixed Linear Time, Random Intercept Model" Ch 6: 2a: Fixed Linear Time, Random Intercept Model

. mixed rt c.time1, /// > || personid: , variance reml covariance(unstructured) /// > residuals(independent,t(session)), 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 = -4207.344 Iteration 1: log restricted-likelihood = -4207.344

Computing standard errors:

Mixed-effects REML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(1) = 131.82 Log restricted-likelihood = -4207.344 Prob > chi2 = 0.0000

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- time1 | -51.57185 4.491815 -11.48 0.000 -60.37565 -42.76806 _cons | 1899.631 46.7882 40.60 0.000 1807.928 1991.334 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Identity | var(_cons) | 202422.7 29469.85 152172.6 269266.3 -----------------------------+------------------------------------------------ var(Residual) | 35661.79 2246.481 31519.73 40348.16 ------------------------------------------------------------------------------ LR test vs. linear regression: chibar2(01) = 787.61 Prob >= chibar2 = 0.0000

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4207.344 4 8422.688 8433.149 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat recovariance, relevel(personid),

Random-effects covariance matrix for level personid

| _cons -------------+----------- _cons | 202422.7

. estat recovariance, relevel(personid) correlation,

Random-effects correlation matrix for level personid

| _cons -------------+----------- _cons | 1

. estat wcorrelation, covariance,

Covariances for personid = 101:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 2.4e+05 2 | 2.0e+05 2.4e+05 3 | 2.0e+05 2.0e+05 2.4e+05 4 | 2.0e+05 2.0e+05 2.0e+05 2.4e+05 5 | 2.0e+05 2.0e+05 2.0e+05 2.0e+05 2.4e+05 6 | 2.0e+05 2.0e+05 2.0e+05 2.0e+05 2.0e+05 2.4e+05

. estat wcorrelation,

Standard deviations and correlations for personid = 101:

Standard deviations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ sd | 487.939 487.939 487.939 487.939 487.939 487.939

Correlations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 1.000 2 | 0.850 1.000 3 | 0.850 0.850 1.000 4 | 0.850 0.850 0.850 1.000 5 | 0.850 0.850 0.850 0.850 1.000 6 | 0.850 0.850 0.850 0.850 0.850 1.000

. * Intercept at Session=1 Time=0 . lincom _cons*1 + c.time1*0

( 1) [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1899.631 46.7882 40.60 0.000 1807.928 1991.334 ------------------------------------------------------------------------------

. * Intercept at Session=2 Time=1 . lincom _cons*1 + c.time1*1

( 1) [rt]time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1848.059 45.91765 40.25 0.000 1758.062 1938.056 ------------------------------------------------------------------------------

. * Intercept at Session=3 Time=2 . lincom _cons*1 + c.time1*2

( 1) 2*[rt]time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1796.487 45.47612 39.50 0.000 1707.356 1885.619 ------------------------------------------------------------------------------

. * Intercept at Session=4 Time=3 . lincom _cons*1 + c.time1*3

( 1) 3*[rt]time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1744.916 45.47612 38.37 0.000 1655.784 1834.047 ------------------------------------------------------------------------------

. * Intercept at Session=5 Time=4 . lincom _cons*1 + c.time1*4

( 1) 4*[rt]time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1693.344 45.91765 36.88 0.000 1603.347 1783.341 ------------------------------------------------------------------------------

. * Intercept at Session=6 Time=5 . lincom _cons*1 + c.time1*5

( 1) 5*[rt]time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1641.772 46.7882 35.09 0.000 1550.069 1733.475 ------------------------------------------------------------------------------

. estimates store FitFixLin,

. . display as result "Ch 6: 2b: Random Linear Time Model" Ch 6: 2b: Random Linear Time Model

. mixed rt c.time1, /// > || personid: time1, variance reml covariance(unstructured) /// > residuals(independent,t(session)), Note: t() not required for this residual structure; ignored

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -4186.0513 Iteration 1: log restricted-likelihood = -4186.0512

Computing standard errors:

Mixed-effects REML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(1) = 70.17 Log restricted-likelihood = -4186.0512 Prob > chi2 = 0.0000

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- time1 | -51.57185 6.156722 -8.38 0.000 -63.63881 -39.5049 _cons | 1899.631 51.4998 36.89 0.000 1798.693 2000.569 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Unstructured | var(time1) | 2233.833 552.9239 1375.178 3628.626 var(_cons) | 253258 37897.26 188881.9 339575.3 cov(time1,_cons) | -12700.79 3621.977 -19799.74 -5601.848 -----------------------------+------------------------------------------------ var(Residual) | 27905.42 1963.419 24310.74 32031.62 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(3) = 830.20 Prob > chi2 = 0.0000

Note: LR test is conservative and provided only for reference.

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4186.051 6 8384.102 8399.793 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat recovariance, relevel(personid),

Random-effects covariance matrix for level personid

| time1 _cons -------------+---------------------- time1 | 2233.833 _cons | -12700.79 253258

. estat recovariance, relevel(personid) correlation,

Random-effects correlation matrix for level personid

| time1 _cons -------------+---------------------- time1 | 1 _cons | -.5339786 1

. estat wcorrelation, covariance,

Covariances for personid = 101:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 2.8e+05 2.4e+05 2.3e+05 2.2e+05 2.0e+05 1.9e+05 2 | 2.4e+05 2.6e+05 2.2e+05 2.1e+05 2.0e+05 1.9e+05 3 | 2.3e+05 2.2e+05 2.4e+05 2.0e+05 1.9e+05 1.9e+05 4 | 2.2e+05 2.1e+05 2.0e+05 2.3e+05 1.9e+05 1.9e+05 5 | 2.0e+05 2.0e+05 1.9e+05 1.9e+05 2.2e+05 1.8e+05 6 | 1.9e+05 1.9e+05 1.9e+05 1.9e+05 1.8e+05 2.1e+05

. estat wcorrelation,

Standard deviations and correlations for personid = 101:

Standard deviations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ sd | 530.248 507.933 489.179 474.408 464.003 458.259

Correlations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 1.000 2 | 0.893 1.000 3 | 0.878 0.884 1.000 4 | 0.855 0.868 0.875 1.000 5 | 0.823 0.843 0.859 0.868 1.000 6 | 0.781 0.809 0.833 0.852 0.864 1.000

. * Intercept at Session=1 Time=0 . lincom _cons*1 + c.time1*0

( 1) [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1899.631 51.4998 36.89 0.000 1798.693 2000.569 ------------------------------------------------------------------------------

. * Intercept at Session=2 Time=1 . lincom _cons*1 + c.time1*1

( 1) [rt]time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1848.059 48.57668 38.04 0.000 1752.851 1943.268 ------------------------------------------------------------------------------

. * Intercept at Session=3 Time=2 . lincom _cons*1 + c.time1*2

( 1) 2*[rt]time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1796.487 46.2922 38.81 0.000 1705.756 1887.218 ------------------------------------------------------------------------------

. * Intercept at Session=4 Time=3 . lincom _cons*1 + c.time1*3

( 1) 3*[rt]time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1744.916 44.7443 39.00 0.000 1657.218 1832.613 ------------------------------------------------------------------------------

. * Intercept at Session=5 Time=4 . lincom _cons*1 + c.time1*4

( 1) 4*[rt]time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1693.344 44.01077 38.48 0.000 1607.084 1779.603 ------------------------------------------------------------------------------

. * Intercept at Session=6 Time=5 . lincom _cons*1 + c.time1*5

( 1) 5*[rt]time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1641.772 44.13223 37.20 0.000 1555.274 1728.269 ------------------------------------------------------------------------------

. estimates store FitRandLin,

. lrtest FitRandLin FitFixLin,

Likelihood-ratio test LR chi2(2) = 42.59 (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 6: 3a: Fixed Quadratic, Random Linear Time Model" Ch 6: 3a: Fixed Quadratic, Random Linear Time Model

. mixed rt c.time1 c.time1#c.time1, /// > || personid: time1, variance reml covariance(unstructured) /// > residuals(independent,t(session)), Note: t() not required for this residual structure; ignored

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -4170.7387 Iteration 1: log restricted-likelihood = -4170.7386

Computing standard errors:

Mixed-effects REML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(2) = 97.86 Log restricted-likelihood = -4170.7386 Prob > chi2 = 0.0000

--------------------------------------------------------------------------------- rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] ----------------+---------------------------------------------------------------- time1 | -120.8999 14.54147 -8.31 0.000 -149.4007 -92.39917 | c.time1#c.time1 | 13.86561 2.634761 5.26 0.000 8.701578 19.02965 | _cons | 1945.85 52.2433 37.25 0.000 1843.455 2048.245 ---------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Unstructured | var(time1) | 2332.667 551.5799 1467.501 3707.891 var(_cons) | 254164 37895.62 189758.3 340429.7 cov(time1,_cons) | -12947.88 3620.697 -20044.31 -5851.442 -----------------------------+------------------------------------------------ var(Residual) | 26175.83 1844.008 22800.05 30051.42 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(3) = 851.78 Prob > chi2 = 0.0000

Note: LR test is conservative and provided only for reference.

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4170.739 7 8355.477 8373.783 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat recovariance, relevel(personid),

Random-effects covariance matrix for level personid

| time1 _cons -------------+---------------------- time1 | 2332.667 _cons | -12947.88 254164

. estat recovariance, relevel(personid) correlation,

Random-effects correlation matrix for level personid

| time1 _cons -------------+---------------------- time1 | 1 _cons | -.5317594 1

. estat wcorrelation, covariance,

Covariances for personid = 101:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 2.8e+05 2.4e+05 2.3e+05 2.2e+05 2.0e+05 1.9e+05 2 | 2.4e+05 2.6e+05 2.2e+05 2.1e+05 2.0e+05 1.9e+05 3 | 2.3e+05 2.2e+05 2.4e+05 2.0e+05 2.0e+05 1.9e+05 4 | 2.2e+05 2.1e+05 2.0e+05 2.2e+05 1.9e+05 1.9e+05 5 | 2.0e+05 2.0e+05 2.0e+05 1.9e+05 2.1e+05 1.8e+05 6 | 1.9e+05 1.9e+05 1.9e+05 1.9e+05 1.8e+05 2.1e+05

. estat wcorrelation,

Standard deviations and correlations for personid = 101:

Standard deviations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ sd | 529.471 506.731 487.728 472.913 462.687 457.360

Correlations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 1.000 2 | 0.899 1.000 3 | 0.884 0.890 1.000 4 | 0.860 0.874 0.882 1.000 5 | 0.826 0.848 0.865 0.875 1.000 6 | 0.782 0.812 0.838 0.858 0.871 1.000

. * Intercept at Session=1 Time=0 . lincom _cons*1 + c.time1*0 + c.time1#c.time1*0

( 1) [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1945.85 52.2433 37.25 0.000 1843.455 2048.245 ------------------------------------------------------------------------------

. * Intercept at Session=2 Time=1 . lincom _cons*1 + c.time1*1 + c.time1#c.time1*1

( 1) [rt]time1 + [rt]c.time1#c.time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1838.815 48.60842 37.83 0.000 1743.545 1934.086 ------------------------------------------------------------------------------

. * Intercept at Session=3 Time=2 . lincom _cons*1 + c.time1*2 + c.time1#c.time1*4

( 1) 2*[rt]time1 + 4*[rt]c.time1#c.time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1759.512 46.82235 37.58 0.000 1667.742 1851.283 ------------------------------------------------------------------------------

. * Intercept at Session=4 Time=3 . lincom _cons*1 + c.time1*3 + c.time1#c.time1*9

( 1) 3*[rt]time1 + 9*[rt]c.time1#c.time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1707.941 45.29258 37.71 0.000 1619.169 1796.712 ------------------------------------------------------------------------------

. * Intercept at Session=5 Time=4 . lincom _cons*1 + c.time1*4 + c.time1#c.time1*16

( 1) 4*[rt]time1 + 16*[rt]c.time1#c.time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1684.1 44.04581 38.24 0.000 1597.772 1770.428 ------------------------------------------------------------------------------

. * Intercept at Session=6 Time=5 . lincom _cons*1 + c.time1*5 + c.time1#c.time1*25

( 1) 5*[rt]time1 + 25*[rt]c.time1#c.time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1687.991 44.99763 37.51 0.000 1599.797 1776.184 ------------------------------------------------------------------------------

. * Linear Slope at Session=1 Time=0 . lincom c.time1*1 + c.time1#c.time1*0

( 1) [rt]time1 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -120.8999 14.54147 -8.31 0.000 -149.4007 -92.39917 ------------------------------------------------------------------------------

. * Linear Slope at Session=2 Time=1 . lincom c.time1*1 + c.time1#c.time1*2

( 1) [rt]time1 + 2*[rt]c.time1#c.time1 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -93.1687 10.01913 -9.30 0.000 -112.8058 -73.53157 ------------------------------------------------------------------------------

. * Linear Slope at Session=3 Time=2 . lincom c.time1*1 + c.time1#c.time1*4

( 1) [rt]time1 + 4*[rt]c.time1#c.time1 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -65.43747 6.696805 -9.77 0.000 -78.56296 -52.31197 ------------------------------------------------------------------------------

. * Linear Slope at Session=4 Time=3 . lincom c.time1*1 + c.time1#c.time1*6

( 1) [rt]time1 + 6*[rt]c.time1#c.time1 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -37.70624 6.696805 -5.63 0.000 -50.83174 -24.58074 ------------------------------------------------------------------------------

. * Linear Slope at Session=5 Time=4 . lincom c.time1*1 + c.time1#c.time1*8

( 1) [rt]time1 + 8*[rt]c.time1#c.time1 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -9.975015 10.01913 -1.00 0.319 -29.61214 9.662113 ------------------------------------------------------------------------------

. * Linear Slope at Session=6 Time=5 . lincom c.time1*1 + c.time1#c.time1*10

( 1) [rt]time1 + 10*[rt]c.time1#c.time1 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 17.75621 14.54147 1.22 0.222 -10.74454 46.25697 ------------------------------------------------------------------------------

. estimates store FitFixQuad,

. . display as result "Ch 6: 3b: Random Quadratic Time Model" Ch 6: 3b: Random Quadratic Time Model

. mixed rt c.time1 c.time1#c.time1, /// > || personid: time1 time1sq, variance reml covariance(unstructured) /// > residuals(independent,t(session)), Note: t() not required for this residual structure; ignored

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -4153.7932 Iteration 1: log restricted-likelihood = -4151.7999 Iteration 2: log restricted-likelihood = -4151.3732 Iteration 3: log restricted-likelihood = -4151.3728

Computing standard errors:

Mixed-effects REML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(2) = 71.74 Log restricted-likelihood = -4151.3728 Prob > chi2 = 0.0000

--------------------------------------------------------------------------------- rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] ----------------+---------------------------------------------------------------- time1 | -120.8999 20.04752 -6.03 0.000 -160.1923 -81.6075 | c.time1#c.time1 | 13.86561 3.41541 4.06 0.000 7.171534 20.55969 | _cons | 1945.85 53.84993 36.13 0.000 1840.306 2051.394 ---------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Unstructured | var(time1) | 25839.79 5864.685 16561.42 40316.29 var(time1sq) | 634.4659 172.375 372.5198 1080.605 var(_cons) | 276207.8 41445.59 205831.2 370647.1 cov(time1,time1sq) | -3903.291 982.6248 -5829.2 -1977.381 cov(time1,_cons) | -35734.05 11947.96 -59151.62 -12316.48 cov(time1sq,_cons) | 3901.974 1950.304 79.44722 7724.5 -----------------------------+------------------------------------------------ var(Residual) | 20298.19 1649.117 17310.19 23801.96 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 890.51 Prob > chi2 = 0.0000

Note: LR test is conservative and provided only for reference.

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4151.373 10 8322.746 8348.897 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat recovariance, relevel(personid),

Random-effects covariance matrix for level personid

| time1 time1sq _cons -------------+--------------------------------- time1 | 25839.79 time1sq | -3903.291 634.4659 _cons | -35734.05 3901.974 276207.8

. estat recovariance, relevel(personid) correlation,

Random-effects correlation matrix for level personid

| time1 time1sq _cons -------------+--------------------------------- time1 | 1 time1sq | -.9640116 1 _cons | -.4229799 .2947557 1

. estat wcorrelation, covariance,

Covariances for personid = 101:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 3.0e+05 2.4e+05 2.2e+05 2.0e+05 2.0e+05 2.0e+05 2 | 2.4e+05 2.5e+05 2.2e+05 2.1e+05 2.0e+05 1.9e+05 3 | 2.2e+05 2.2e+05 2.4e+05 2.1e+05 2.0e+05 1.9e+05 4 | 2.0e+05 2.1e+05 2.1e+05 2.3e+05 2.0e+05 1.8e+05 5 | 2.0e+05 2.0e+05 2.0e+05 2.0e+05 2.1e+05 1.8e+05 6 | 2.0e+05 1.9e+05 1.9e+05 1.8e+05 1.8e+05 2.0e+05

. estat wcorrelation,

Standard deviations and correlations for personid = 101:

Standard deviations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ sd | 544.524 501.507 485.637 474.878 460.147 448.305

Correlations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 1.000 2 | 0.895 1.000 3 | 0.833 0.900 1.000 4 | 0.789 0.876 0.906 1.000 5 | 0.781 0.864 0.894 0.902 1.000 6 | 0.799 0.851 0.863 0.869 0.885 1.000

. * Intercept at Session=1 Time=0 . lincom _cons*1 + c.time1*0 + c.time1#c.time1*0

( 1) [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1945.85 53.84993 36.13 0.000 1840.306 2051.394 ------------------------------------------------------------------------------

. * Intercept at Session=2 Time=1 . lincom _cons*1 + c.time1*1 + c.time1#c.time1*1

( 1) [rt]time1 + [rt]c.time1#c.time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1838.815 48.48658 37.92 0.000 1743.784 1933.847 ------------------------------------------------------------------------------

. * Intercept at Session=3 Time=2 . lincom _cons*1 + c.time1*2 + c.time1#c.time1*4

( 1) 2*[rt]time1 + 4*[rt]c.time1#c.time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1759.512 46.99744 37.44 0.000 1667.399 1851.626 ------------------------------------------------------------------------------

. * Intercept at Session=4 Time=3 . lincom _cons*1 + c.time1*3 + c.time1#c.time1*9

( 1) 3*[rt]time1 + 9*[rt]c.time1#c.time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1707.941 45.89598 37.21 0.000 1617.986 1797.895 ------------------------------------------------------------------------------

. * Intercept at Session=5 Time=4 . lincom _cons*1 + c.time1*4 + c.time1#c.time1*16

( 1) 4*[rt]time1 + 16*[rt]c.time1#c.time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1684.1 44.23964 38.07 0.000 1597.392 1770.808 ------------------------------------------------------------------------------

. * Intercept at Session=6 Time=5 . lincom _cons*1 + c.time1*5 + c.time1#c.time1*25

( 1) 5*[rt]time1 + 25*[rt]c.time1#c.time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1687.991 44.20394 38.19 0.000 1601.352 1774.629 ------------------------------------------------------------------------------

. * Linear Slope at Session=1 Time=0 . lincom c.time1*1 + c.time1#c.time1*0

( 1) [rt]time1 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -120.8999 20.04752 -6.03 0.000 -160.1923 -81.6075 ------------------------------------------------------------------------------

. * Linear Slope at Session=2 Time=1 . lincom c.time1*1 + c.time1#c.time1*2

( 1) [rt]time1 + 2*[rt]c.time1#c.time1 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -93.1687 13.64968 -6.83 0.000 -119.9216 -66.4158 ------------------------------------------------------------------------------

. * Linear Slope at Session=3 Time=2 . lincom c.time1*1 + c.time1#c.time1*4

( 1) [rt]time1 + 4*[rt]c.time1#c.time1 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -65.43747 8.002796 -8.18 0.000 -81.12266 -49.75228 ------------------------------------------------------------------------------

. * Linear Slope at Session=4 Time=3 . lincom c.time1*1 + c.time1#c.time1*6

( 1) [rt]time1 + 6*[rt]c.time1#c.time1 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -37.70624 5.92417 -6.36 0.000 -49.3174 -26.09508 ------------------------------------------------------------------------------

. * Linear Slope at Session=5 Time=4 . lincom c.time1*1 + c.time1#c.time1*8

( 1) [rt]time1 + 8*[rt]c.time1#c.time1 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -9.975015 9.973315 -1.00 0.317 -29.52235 9.572324 ------------------------------------------------------------------------------

. * Linear Slope at Session=6 Time=5 . lincom c.time1*1 + c.time1#c.time1*10

( 1) [rt]time1 + 10*[rt]c.time1#c.time1 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 17.75621 16.03616 1.11 0.268 -13.67408 49.18651 ------------------------------------------------------------------------------

. estimates store FitRandQuad,

. lrtest FitRandQuad FitFixQuad,

Likelihood-ratio test LR chi2(3) = 38.73 (Assumption: FitFixQuad nested in FitRandQuad) 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 6: 3b: Random Quadratic Time Model (0=Session 6)" Ch 6: 3b: Random Quadratic Time Model (0=Session 6)

. mixed rt c.time6 c.time6#c.time6, /// > || personid: time6 time6sq, variance reml covariance(unstructured) /// > residuals(independent,t(session)), Note: t() not required for this residual structure; ignored

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -4153.4279 Iteration 1: log restricted-likelihood = -4151.4942 Iteration 2: log restricted-likelihood = -4151.3729 Iteration 3: log restricted-likelihood = -4151.3728

Computing standard errors:

Mixed-effects REML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(2) = 71.74 Log restricted-likelihood = -4151.3728 Prob > chi2 = 0.0000

--------------------------------------------------------------------------------- rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] ----------------+---------------------------------------------------------------- time6 | 17.75621 16.03619 1.11 0.268 -13.67415 49.18657 | c.time6#c.time6 | 13.86561 3.415417 4.06 0.000 7.17152 20.55971 | _cons | 1687.991 44.20384 38.19 0.000 1601.353 1774.628 ---------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Unstructured | var(time6) | 11220.67 3863.737 5713.673 22035.48 var(time6sq) | 634.4708 172.3738 372.5257 1080.605 var(_cons) | 180678.4 27942.63 133433.4 244651.5 cov(time6,time6sq) | 2441.391 788.0532 896.8351 3985.947 cov(time6,_cons) | -1645.855 7298.43 -15950.52 12658.8 cov(time6sq,_cons) | 247.1107 1545.719 -2782.443 3276.664 -----------------------------+------------------------------------------------ var(Residual) | 20298.18 1649.115 17310.19 23801.95 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 890.51 Prob > chi2 = 0.0000

Note: LR test is conservative and provided only for reference.

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4151.373 10 8322.746 8348.897 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat recovariance, relevel(personid),

Random-effects covariance matrix for level personid

| time6 time6sq _cons -------------+--------------------------------- time6 | 11220.67 time6sq | 2441.391 634.4708 _cons | -1645.855 247.1107 180678.4

. estat recovariance, relevel(personid) correlation,

Random-effects correlation matrix for level personid

| time6 time6sq _cons -------------+--------------------------------- time6 | 1 time6sq | .915002 1 _cons | -.0365535 .0230798 1

. estat wcorrelation, covariance,

Covariances for personid = 101:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 3.0e+05 2.4e+05 2.2e+05 2.0e+05 2.0e+05 2.0e+05 2 | 2.4e+05 2.5e+05 2.2e+05 2.1e+05 2.0e+05 1.9e+05 3 | 2.2e+05 2.2e+05 2.4e+05 2.1e+05 2.0e+05 1.9e+05 4 | 2.0e+05 2.1e+05 2.1e+05 2.3e+05 2.0e+05 1.8e+05 5 | 2.0e+05 2.0e+05 2.0e+05 2.0e+05 2.1e+05 1.8e+05 6 | 2.0e+05 1.9e+05 1.9e+05 1.8e+05 1.8e+05 2.0e+05

. estat wcorrelation,

Standard deviations and correlations for personid = 101:

Standard deviations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ sd | 544.522 501.506 485.637 474.878 460.147 448.304

Correlations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 1.000 2 | 0.895 1.000 3 | 0.833 0.900 1.000 4 | 0.789 0.876 0.906 1.000 5 | 0.781 0.864 0.894 0.902 1.000 6 | 0.799 0.851 0.863 0.869 0.885 1.000

. * Intercept at Session=1 Time=-5 . lincom _cons*1 + c.time6*-5 + c.time6#c.time6*25

( 1) - 5*[rt]time6 + 25*[rt]c.time6#c.time6 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1945.85 53.84975 36.13 0.000 1840.306 2051.393 ------------------------------------------------------------------------------

. * Intercept at Session=2 Time=-4 . lincom _cons*1 + c.time6*-4 + c.time6#c.time6*16

( 1) - 4*[rt]time6 + 16*[rt]c.time6#c.time6 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1838.815 48.48645 37.92 0.000 1743.784 1933.847 ------------------------------------------------------------------------------

. * Intercept at Session=3 Time=-3 . lincom _cons*1 + c.time6*-3 + c.time6#c.time6*9

( 1) - 3*[rt]time6 + 9*[rt]c.time6#c.time6 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1759.512 46.99736 37.44 0.000 1667.399 1851.626 ------------------------------------------------------------------------------

. * Intercept at Session=4 Time=-2 . lincom _cons*1 + c.time6*-2 + c.time6#c.time6*4

( 1) - 2*[rt]time6 + 4*[rt]c.time6#c.time6 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1707.941 45.89593 37.21 0.000 1617.986 1797.895 ------------------------------------------------------------------------------

. * Intercept at Session=5 Time=-1 . lincom _cons*1 + c.time6*-1 + c.time6#c.time6*1

( 1) - [rt]time6 + [rt]c.time6#c.time6 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1684.1 44.23958 38.07 0.000 1597.392 1770.808 ------------------------------------------------------------------------------

. * Intercept at Session=6 Time= 0 . lincom _cons*1 + c.time6*0 + c.time6#c.time6*0

( 1) [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1687.991 44.20384 38.19 0.000 1601.353 1774.628 ------------------------------------------------------------------------------

. * Linear Slope at Session=1 Time=-5 . lincom c.time6*1 + c.time6#c.time6*-10

( 1) [rt]time6 - 10*[rt]c.time6#c.time6 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -120.8999 20.04756 -6.03 0.000 -160.1924 -81.60743 ------------------------------------------------------------------------------

. * Linear Slope at Session=2 Time=-4 . lincom c.time6*1 + c.time6#c.time6*-8

( 1) [rt]time6 - 8*[rt]c.time6#c.time6 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -93.1687 13.6497 -6.83 0.000 -119.9216 -66.41577 ------------------------------------------------------------------------------

. * Linear Slope at Session=3 Time=-3 . lincom c.time6*1 + c.time6#c.time6*-6

( 1) [rt]time6 - 6*[rt]c.time6#c.time6 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -65.43747 8.002802 -8.18 0.000 -81.12267 -49.75226 ------------------------------------------------------------------------------

. * Linear Slope at Session=4 Time=-2 . lincom c.time6*1 + c.time6#c.time6*-4

( 1) [rt]time6 - 4*[rt]c.time6#c.time6 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -37.70624 5.924171 -6.36 0.000 -49.3174 -26.09508 ------------------------------------------------------------------------------

. * Linear Slope at Session=5 Time=-1 . lincom c.time6*1 + c.time6#c.time6*-2

( 1) [rt]time6 - 2*[rt]c.time6#c.time6 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -9.975015 9.973331 -1.00 0.317 -29.52239 9.572356 ------------------------------------------------------------------------------

. * Linear Slope at Session=6 Time= 0 . lincom c.time6*1 + c.time6#c.time6*0

( 1) [rt]time6 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 17.75621 16.03619 1.11 0.268 -13.67415 49.18657 ------------------------------------------------------------------------------

. . display as result "Ch 6: 4a: Fixed Slope12, Fixed Slope26, Random Intercept Model" Ch 6: 4a: Fixed Slope12, Fixed Slope26, Random Intercept Model

. mixed rt c.slope12 c.slope26, /// > || personid: , variance reml covariance(unstructured) /// > residuals(independent,t(session)), 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 = -4191.3436 Iteration 1: log restricted-likelihood = -4191.3436

Computing standard errors:

Mixed-effects REML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(2) = 161.98 Log restricted-likelihood = -4191.3436 Prob > chi2 = 0.0000

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- slope12 | -163.644 23.24149 -7.04 0.000 -209.1965 -118.0915 slope26 | -32.89317 5.810373 -5.66 0.000 -44.28129 -21.50504 _cons | 1961.893 48.4187 40.52 0.000 1866.994 2056.792 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Identity | var(_cons) | 202683.4 29469.65 152424.8 269513.6 -----------------------------+------------------------------------------------ var(Residual) | 34098.04 2150.109 30133.91 38583.65 ------------------------------------------------------------------------------ LR test vs. linear regression: chibar2(01) = 805.80 Prob >= chibar2 = 0.0000

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4191.344 5 8392.687 8405.763 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat recovariance, relevel(personid),

Random-effects covariance matrix for level personid

| _cons -------------+----------- _cons | 202683.4

. estat recovariance, relevel(personid) correlation,

Random-effects correlation matrix for level personid

| _cons -------------+----------- _cons | 1

. estat wcorrelation, covariance,

Covariances for personid = 101:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 2.4e+05 2 | 2.0e+05 2.4e+05 3 | 2.0e+05 2.0e+05 2.4e+05 4 | 2.0e+05 2.0e+05 2.0e+05 2.4e+05 5 | 2.0e+05 2.0e+05 2.0e+05 2.0e+05 2.4e+05 6 | 2.0e+05 2.0e+05 2.0e+05 2.0e+05 2.0e+05 2.4e+05

. estat wcorrelation,

Standard deviations and correlations for personid = 101:

Standard deviations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ sd | 486.602 486.602 486.602 486.602 486.602 486.602

Correlations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 1.000 2 | 0.856 1.000 3 | 0.856 0.856 1.000 4 | 0.856 0.856 0.856 1.000 5 | 0.856 0.856 0.856 0.856 1.000 6 | 0.856 0.856 0.856 0.856 0.856 1.000

. * Intercept at Session=1 Time=0 . lincom _cons*1 + c.slope12*0 + c.slope26*0

( 1) [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1961.893 48.4187 40.52 0.000 1866.994 2056.792 ------------------------------------------------------------------------------

. * Intercept at Session=2 Time=1 . lincom _cons*1 + c.slope12*1 + c.slope26*0

( 1) [rt]slope12 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1798.249 47.00349 38.26 0.000 1706.124 1890.375 ------------------------------------------------------------------------------

. * Intercept at Session=3 Time=2 . lincom _cons*1 + c.slope12*1 + c.slope26*1

( 1) [rt]slope12 + [rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1765.356 45.91347 38.45 0.000 1675.367 1855.345 ------------------------------------------------------------------------------

. * Intercept at Session=4 Time=3 . lincom _cons*1 + c.slope12*1 + c.slope26*2

( 1) [rt]slope12 + 2*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1732.463 45.54434 38.04 0.000 1643.198 1821.728 ------------------------------------------------------------------------------

. * Intercept at Session=5 Time=4 . lincom _cons*1 + c.slope12*1 + c.slope26*3

( 1) [rt]slope12 + 3*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1699.57 45.91347 37.02 0.000 1609.581 1789.559 ------------------------------------------------------------------------------

. * Intercept at Session=6 Time=5 . lincom _cons*1 + c.slope12*1 + c.slope26*4

( 1) [rt]slope12 + 4*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1666.677 47.00349 35.46 0.000 1574.552 1758.802 ------------------------------------------------------------------------------

. * Difference between slope12 and slope26 . lincom c.slope12*-1 + c.slope26*1

( 1) - [rt]slope12 + [rt]slope26 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 130.7508 26.62648 4.91 0.000 78.56389 182.9378 ------------------------------------------------------------------------------

. estimates store FitFix12Fix26,

. . display as result "Ch 6: 4b: Random Slope12, Fixed Slope26 Model" Ch 6: 4b: Random Slope12, Fixed Slope26 Model

. mixed rt c.slope12 c.slope26, /// > || personid: slope12, variance reml covariance(unstructured) /// > residuals(independent,t(session)), Note: t() not required for this residual structure; ignored

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -4159.8067 Iteration 1: log restricted-likelihood = -4159.8066

Computing standard errors:

Mixed-effects REML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(2) = 104.99 Log restricted-likelihood = -4159.8066 Prob > chi2 = 0.0000

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- slope12 | -163.644 31.24619 -5.24 0.000 -224.8854 -102.4026 slope26 | -32.89317 4.891648 -6.72 0.000 -42.48062 -23.30571 _cons | 1961.893 54.6805 35.88 0.000 1854.722 2069.065 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Unstructured | var(slope12) | 59940.74 12743.1 39514.9 90925 var(_cons) | 277818.2 42741.21 205497.6 375590.5 cov(slope12,_cons) | -69063.12 18931.72 -106168.6 -31957.64 -----------------------------+------------------------------------------------ var(Residual) | 24167.5 1702.528 21050.73 27745.74 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(3) = 868.87 Prob > chi2 = 0.0000

Note: LR test is conservative and provided only for reference.

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4159.807 7 8333.613 8351.919 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat recovariance, relevel(personid),

Random-effects covariance matrix for level personid

| slope12 _cons -------------+---------------------- slope12 | 59940.74 _cons | -69063.12 277818.2

. estat recovariance, relevel(personid) correlation,

Random-effects correlation matrix for level personid

| slope12 _cons -------------+---------------------- slope12 | 1 _cons | -.5351861 1

. estat wcorrelation, covariance,

Covariances for personid = 101:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 3.0e+05 2 | 2.1e+05 2.2e+05 3 | 2.1e+05 2.0e+05 2.2e+05 4 | 2.1e+05 2.0e+05 2.0e+05 2.2e+05 5 | 2.1e+05 2.0e+05 2.0e+05 2.0e+05 2.2e+05 6 | 2.1e+05 2.0e+05 2.0e+05 2.0e+05 2.0e+05 2.2e+05

. estat wcorrelation,

Standard deviations and correlations for personid = 101:

Standard deviations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ sd | 549.532 473.075 473.075 473.075 473.075 473.075

Correlations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 1.000 2 | 0.803 1.000 3 | 0.803 0.892 1.000 4 | 0.803 0.892 0.892 1.000 5 | 0.803 0.892 0.892 0.892 1.000 6 | 0.803 0.892 0.892 0.892 0.892 1.000

. * Intercept at Session=1 Time=0 . lincom _cons*1 + c.slope12*0 + c.slope26*0

( 1) [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1961.893 54.6805 35.88 0.000 1854.722 2069.065 ------------------------------------------------------------------------------

. * Intercept at Session=2 Time=1 . lincom _cons*1 + c.slope12*1 + c.slope26*0

( 1) [rt]slope12 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1798.249 46.04488 39.05 0.000 1708.003 1888.496 ------------------------------------------------------------------------------

. * Intercept at Session=3 Time=2 . lincom _cons*1 + c.slope12*1 + c.slope26*1

( 1) [rt]slope12 + [rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1765.356 45.25866 39.01 0.000 1676.651 1854.062 ------------------------------------------------------------------------------

. * Intercept at Session=4 Time=3 . lincom _cons*1 + c.slope12*1 + c.slope26*2

( 1) [rt]slope12 + 2*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1732.463 44.99353 38.50 0.000 1644.277 1820.649 ------------------------------------------------------------------------------

. * Intercept at Session=5 Time=4 . lincom _cons*1 + c.slope12*1 + c.slope26*3

( 1) [rt]slope12 + 3*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1699.57 45.25866 37.55 0.000 1610.865 1788.275 ------------------------------------------------------------------------------

. * Intercept at Session=6 Time=5 . lincom _cons*1 + c.slope12*1 + c.slope26*4

( 1) [rt]slope12 + 4*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1666.677 46.04488 36.20 0.000 1576.43 1756.923 ------------------------------------------------------------------------------

. * Difference between slope12 and slope26 . lincom c.slope12*-1 + c.slope26*1

( 1) - [rt]slope12 + [rt]slope26 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 130.7508 33.10537 3.95 0.000 65.8655 195.6361 ------------------------------------------------------------------------------

. estimates store FitRand12Fix26,

. lrtest FitRand12Fix26 FitFix12Fix26,

Likelihood-ratio test LR chi2(2) = 63.07 (Assumption: FitFix12Fix26 nested in FitRand12Fix26) 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 6: 4c: Random Slope12, Random Slope26 Model" Ch 6: 4c: Random Slope12, Random Slope26 Model

. mixed rt c.slope12 c.slope26, /// > || personid: slope12 slope26, variance reml covariance(unstructured) /// > residuals(independent,t(session)), Note: t() not required for this residual structure; ignored

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -4137.6957 Iteration 1: log restricted-likelihood = -4137.6872 Iteration 2: log restricted-likelihood = -4137.6872

Computing standard errors:

Mixed-effects REML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(2) = 73.15 Log restricted-likelihood = -4137.6872 Prob > chi2 = 0.0000

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- slope12 | -163.644 30.21884 -5.42 0.000 -222.8718 -104.4161 slope26 | -32.89317 6.588755 -4.99 0.000 -45.80689 -19.97944 _cons | 1961.893 54.6805 35.88 0.000 1854.722 2069.065 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Unstructured | var(slope12) | 63954.2 13244.2 42618.17 95971.74 var(slope26) | 2617.279 636.4813 1624.992 4215.499 var(_cons) | 284312.6 42731.62 211768.9 381706.9 cov(slope12,slope26) | -1672.296 2097.085 -5782.507 2437.916 cov(slope12,_cons) | -54269.95 18230.63 -90001.32 -18538.58 cov(slope26,_cons) | -10643.8 3791.318 -18074.64 -3212.951 -----------------------------+------------------------------------------------ var(Residual) | 17673.02 1435.834 15071.46 20723.64 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 913.11 Prob > chi2 = 0.0000

Note: LR test is conservative and provided only for reference.

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4137.687 10 8295.374 8321.526 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat recovariance, relevel(personid),

Random-effects covariance matrix for level personid

| slope12 slope26 _cons -------------+--------------------------------- slope12 | 63954.2 slope26 | -1672.296 2617.279 _cons | -54269.95 -10643.8 284312.6

. estat recovariance, relevel(personid) correlation,

Random-effects correlation matrix for level personid

| slope12 slope26 _cons -------------+--------------------------------- slope12 | 1 slope26 | -.1292568 1 _cons | -.4024638 -.3901876 1

. estat wcorrelation, covariance,

Covariances for personid = 101:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 3.0e+05 2.3e+05 2.2e+05 2.1e+05 2.0e+05 1.9e+05 2 | 2.3e+05 2.6e+05 2.3e+05 2.2e+05 2.0e+05 1.9e+05 3 | 2.2e+05 2.3e+05 2.4e+05 2.1e+05 2.0e+05 1.9e+05 4 | 2.1e+05 2.2e+05 2.1e+05 2.2e+05 1.9e+05 1.9e+05 5 | 2.0e+05 2.0e+05 2.0e+05 1.9e+05 2.1e+05 1.8e+05 6 | 1.9e+05 1.9e+05 1.9e+05 1.9e+05 1.8e+05 2.0e+05

. estat wcorrelation,

Standard deviations and correlations for personid = 101:

Standard deviations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ sd | 549.532 507.346 485.165 467.552 455.037 448.049

Correlations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 1.000 2 | 0.825 1.000 3 | 0.823 0.924 1.000 4 | 0.812 0.907 0.917 1.000 5 | 0.792 0.878 0.898 0.911 1.000 6 | 0.761 0.838 0.868 0.892 0.907 1.000

. * Intercept at Session=1 Time=0 . lincom _cons*1 + c.slope12*0 + c.slope26*0

( 1) [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1961.893 54.6805 35.88 0.000 1854.722 2069.065 ------------------------------------------------------------------------------

. * Intercept at Session=2 Time=1 . lincom _cons*1 + c.slope12*1 + c.slope26*0

( 1) [rt]slope12 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1798.249 49.78476 36.12 0.000 1700.673 1895.826 ------------------------------------------------------------------------------

. * Intercept at Session=3 Time=2 . lincom _cons*1 + c.slope12*1 + c.slope26*1

( 1) [rt]slope12 + [rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1765.356 46.98998 37.57 0.000 1673.258 1857.455 ------------------------------------------------------------------------------

. * Intercept at Session=4 Time=3 . lincom _cons*1 + c.slope12*1 + c.slope26*2

( 1) [rt]slope12 + 2*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1732.463 44.99354 38.50 0.000 1644.277 1820.649 ------------------------------------------------------------------------------

. * Intercept at Session=5 Time=4 . lincom _cons*1 + c.slope12*1 + c.slope26*3

( 1) [rt]slope12 + 3*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1699.57 43.90446 38.71 0.000 1613.519 1785.621 ------------------------------------------------------------------------------

. * Intercept at Session=6 Time=5 . lincom _cons*1 + c.slope12*1 + c.slope26*4

( 1) [rt]slope12 + 4*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1666.677 43.79051 38.06 0.000 1580.849 1752.505 ------------------------------------------------------------------------------

. * Difference between slope12 and slope26 . lincom c.slope12*-1 + c.slope26*1

( 1) - [rt]slope12 + [rt]slope26 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 130.7508 32.55299 4.02 0.000 66.94814 194.5535 ------------------------------------------------------------------------------

. estimates store FitRand12Rand26,

. lrtest FitRand12Rand26 FitRand12Fix26,

Likelihood-ratio test LR chi2(3) = 44.24 (Assumption: FitRand12Fix26 nested in FitRand12Ra~26) 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 6: Random Slope12, Random Slope26 Model + Fixed Quadratic Slope26" Ch 6: Random Slope12, Random Slope26 Model + Fixed Quadratic Slope26

. mixed rt c.slope12 c.slope26 c.slope26#c.slope26, /// > || personid: slope12 slope26, variance reml covariance(unstructured) /// > residuals(independent,t(session)), Note: t() not required for this residual structure; ignored

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -4134.1452 Iteration 1: log restricted-likelihood = -4134.1368 Iteration 2: log restricted-likelihood = -4134.1368

Computing standard errors:

Mixed-effects REML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(3) = 75.90 Log restricted-likelihood = -4134.1368 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------- rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] --------------------+---------------------------------------------------------------- slope12 | -151.9563 31.03041 -4.90 0.000 -212.7748 -91.13787 slope26 | -56.26845 15.56413 -3.62 0.000 -86.77358 -25.76332 | c.slope26#c.slope26 | 5.843821 3.525181 1.66 0.097 -1.065407 12.75305 | _cons | 1961.893 54.6805 35.88 0.000 1854.722 2069.065 -------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Unstructured | var(slope12) | 64116.4 13242.57 42772.28 96111.62 var(slope26) | 2627.417 636.3491 1634.45 4223.635 var(_cons) | 284414 42731.42 211867 381802.4 cov(slope12,slope26) | -1692.571 2096.926 -5802.47 2417.328 cov(slope12,_cons) | -54371.32 18230.17 -90101.8 -18640.83 cov(slope26,_cons) | -10643.8 3791.318 -18074.64 -3212.95 -----------------------------+------------------------------------------------ var(Residual) | 17571.64 1429.959 14981.06 20610.2 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 913.05 Prob > chi2 = 0.0000

Note: LR test is conservative and provided only for reference.

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4134.137 11 8290.274 8319.04 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat recovariance, relevel(personid),

Random-effects covariance matrix for level personid

| slope12 slope26 _cons -------------+--------------------------------- slope12 | 64116.4 slope26 | -1692.571 2627.417 _cons | -54371.32 -10643.8 284414

. estat recovariance, relevel(personid) correlation,

Random-effects correlation matrix for level personid

| slope12 slope26 _cons -------------+--------------------------------- slope12 | 1 slope26 | -.1304061 1 _cons | -.4026334 -.3893648 1

. estat wcorrelation, covariance,

Covariances for personid = 101:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 3.0e+05 2 | 2.3e+05 2.6e+05 3 | 2.2e+05 2.3e+05 2.4e+05 4 | 2.1e+05 2.2e+05 2.1e+05 2.2e+05 5 | 2.0e+05 2.0e+05 2.0e+05 1.9e+05 2.1e+05 6 | 1.9e+05 1.9e+05 1.9e+05 1.9e+05 1.8e+05 2.0e+05

. estat wcorrelation,

Standard deviations and correlations for personid = 101:

Standard deviations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ sd | 549.532 507.306 485.092 467.465 454.959 448.003

Correlations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 1.000 2 | 0.825 1.000 3 | 0.823 0.924 1.000 4 | 0.813 0.907 0.917 1.000 5 | 0.792 0.879 0.899 0.912 1.000 6 | 0.761 0.838 0.868 0.892 0.907 1.000

. . display as result "Ch 6: 5a: Fixed Time, Fixed Slope26, Random Intercept Model" Ch 6: 5a: Fixed Time, Fixed Slope26, Random Intercept Model

. mixed rt c.time1 c.slope26, /// > || personid: , variance reml covariance(unstructured) /// > residuals(independent,t(session)), 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 = -4191.3436 Iteration 1: log restricted-likelihood = -4191.3436

Computing standard errors:

Mixed-effects REML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(2) = 161.98 Log restricted-likelihood = -4191.3436 Prob > chi2 = 0.0000

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- time1 | -163.644 23.24149 -7.04 0.000 -209.1965 -118.0915 slope26 | 130.7508 26.62648 4.91 0.000 78.56389 182.9378 _cons | 1961.893 48.4187 40.52 0.000 1866.994 2056.792 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Identity | var(_cons) | 202683.4 29469.65 152424.8 269513.6 -----------------------------+------------------------------------------------ var(Residual) | 34098.04 2150.109 30133.91 38583.65 ------------------------------------------------------------------------------ LR test vs. linear regression: chibar2(01) = 805.80 Prob >= chibar2 = 0.0000

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4191.344 5 8392.687 8405.763 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat recovariance, relevel(personid),

Random-effects covariance matrix for level personid

| _cons -------------+----------- _cons | 202683.4

. estat recovariance, relevel(personid) correlation,

Random-effects correlation matrix for level personid

| _cons -------------+----------- _cons | 1

. estat wcorrelation, covariance,

Covariances for personid = 101:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 2.4e+05 2 | 2.0e+05 2.4e+05 3 | 2.0e+05 2.0e+05 2.4e+05 4 | 2.0e+05 2.0e+05 2.0e+05 2.4e+05 5 | 2.0e+05 2.0e+05 2.0e+05 2.0e+05 2.4e+05 6 | 2.0e+05 2.0e+05 2.0e+05 2.0e+05 2.0e+05 2.4e+05

. estat wcorrelation,

Standard deviations and correlations for personid = 101:

Standard deviations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ sd | 486.602 486.602 486.602 486.602 486.602 486.602

Correlations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 1.000 2 | 0.856 1.000 3 | 0.856 0.856 1.000 4 | 0.856 0.856 0.856 1.000 5 | 0.856 0.856 0.856 0.856 1.000 6 | 0.856 0.856 0.856 0.856 0.856 1.000

. * Intercept at Session=1 Time=0 . lincom _cons*1 + c.time1*0 + c.slope26*0

( 1) [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1961.893 48.4187 40.52 0.000 1866.994 2056.792 ------------------------------------------------------------------------------

. * Intercept at Session=2 Time=1 . lincom _cons*1 + c.time1*1 + c.slope26*0

( 1) [rt]time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1798.249 47.00349 38.26 0.000 1706.124 1890.375 ------------------------------------------------------------------------------

. * Intercept at Session=3 Time=2 . lincom _cons*1 + c.time1*2 + c.slope26*1

( 1) 2*[rt]time1 + [rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1765.356 45.91347 38.45 0.000 1675.367 1855.345 ------------------------------------------------------------------------------

. * Intercept at Session=4 Time=3 . lincom _cons*1 + c.time1*3 + c.slope26*2

( 1) 3*[rt]time1 + 2*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1732.463 45.54434 38.04 0.000 1643.198 1821.728 ------------------------------------------------------------------------------

. * Intercept at Session=5 Time=4 . lincom _cons*1 + c.time1*4 + c.slope26*3

( 1) 4*[rt]time1 + 3*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1699.57 45.91347 37.02 0.000 1609.581 1789.559 ------------------------------------------------------------------------------

. * Intercept at Session=6 Time=5 . lincom _cons*1 + c.time1*5 + c.slope26*4

( 1) 5*[rt]time1 + 4*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1666.677 47.00349 35.46 0.000 1574.552 1758.802 ------------------------------------------------------------------------------

. * Rate of change from session 2 to 6 . lincom c.time1*1 + c.slope26*1

( 1) [rt]time1 + [rt]slope26 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -32.89317 5.810373 -5.66 0.000 -44.28129 -21.50504 ------------------------------------------------------------------------------

. estimates store FitFix16Fix26,

. . display as result "Ch 6: 5b: Random Time, Fixed Slope26 Model" Ch 6: 5b: Random Time, Fixed Slope26 Model

. mixed rt c.time1 c.slope26, /// > || personid: time1, variance reml covariance(unstructured) /// > residuals(independent,t(session)), Note: t() not required for this residual structure; ignored

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -4166.6906 Iteration 1: log restricted-likelihood = -4166.6906

Computing standard errors:

Mixed-effects REML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(2) = 101.87 Log restricted-likelihood = -4166.6906 Prob > chi2 = 0.0000

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- time1 | -163.644 20.83445 -7.85 0.000 -204.4788 -122.8092 slope26 | 130.7508 23.22133 5.63 0.000 85.23785 176.2638 _cons | 1961.893 52.67356 37.25 0.000 1858.655 2065.132 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Unstructured | var(time1) | 2346.464 551.3954 1480.437 3719.098 var(_cons) | 254290.5 37895.39 189880.6 340549 cov(time1,_cons) | -12982.37 3620.524 -20078.47 -5886.277 -----------------------------+------------------------------------------------ var(Residual) | 25934.4 1827.001 22589.76 29774.25 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(3) = 855.10 Prob > chi2 = 0.0000

Note: LR test is conservative and provided only for reference.

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4166.691 7 8347.381 8365.687 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat recovariance, relevel(personid),

Random-effects covariance matrix for level personid

| time1 _cons -------------+---------------------- time1 | 2346.464 _cons | -12982.37 254290.5

. estat recovariance, relevel(personid) correlation,

Random-effects correlation matrix for level personid

| time1 _cons -------------+---------------------- time1 | 1 _cons | -.5314741 1

. estat wcorrelation, covariance,

Covariances for personid = 101:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 2.8e+05 2.4e+05 2.3e+05 2.2e+05 2.0e+05 1.9e+05 2 | 2.4e+05 2.6e+05 2.2e+05 2.1e+05 2.0e+05 1.9e+05 3 | 2.3e+05 2.2e+05 2.4e+05 2.0e+05 2.0e+05 1.9e+05 4 | 2.2e+05 2.1e+05 2.0e+05 2.2e+05 1.9e+05 1.9e+05 5 | 2.0e+05 2.0e+05 2.0e+05 1.9e+05 2.1e+05 1.8e+05 6 | 1.9e+05 1.9e+05 1.9e+05 1.9e+05 1.8e+05 2.1e+05

. estat wcorrelation,

Standard deviations and correlations for personid = 101:

Standard deviations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ sd | 529.363 506.564 487.526 472.704 462.503 457.234

Correlations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 1.000 2 | 0.900 1.000 3 | 0.885 0.891 1.000 4 | 0.861 0.874 0.883 1.000 5 | 0.827 0.848 0.866 0.876 1.000 6 | 0.782 0.812 0.838 0.859 0.872 1.000

. * Intercept at Session=1 Time=0 . lincom _cons*1 + c.time1*0 + c.slope26*0

( 1) [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1961.893 52.67356 37.25 0.000 1858.655 2065.132 ------------------------------------------------------------------------------

. * Intercept at Session=2 Time=1 . lincom _cons*1 + c.time1*1 + c.slope26*0

( 1) [rt]time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1798.249 49.37559 36.42 0.000 1701.475 1895.024 ------------------------------------------------------------------------------

. * Intercept at Session=3 Time=2 . lincom _cons*1 + c.time1*2 + c.slope26*1

( 1) 2*[rt]time1 + [rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1765.356 46.6212 37.87 0.000 1673.98 1856.732 ------------------------------------------------------------------------------

. * Intercept at Session=4 Time=3 . lincom _cons*1 + c.time1*3 + c.slope26*2

( 1) 3*[rt]time1 + 2*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1732.463 44.79893 38.67 0.000 1644.659 1820.267 ------------------------------------------------------------------------------

. * Intercept at Session=5 Time=4 . lincom _cons*1 + c.time1*4 + c.slope26*3

( 1) 4*[rt]time1 + 3*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1699.57 44.02466 38.60 0.000 1613.283 1785.857 ------------------------------------------------------------------------------

. * Intercept at Session=6 Time=5 . lincom _cons*1 + c.time1*5 + c.slope26*4

( 1) 5*[rt]time1 + 4*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1666.677 44.35333 37.58 0.000 1579.746 1753.608 ------------------------------------------------------------------------------

. * Rate of change from session 2 to 6 . lincom c.time1*1 + c.slope26*1

( 1) [rt]time1 + [rt]slope26 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -32.89317 6.993564 -4.70 0.000 -46.6003 -19.18603 ------------------------------------------------------------------------------

. estimates store FitRand16Fix26,

. lrtest FitRand16Fix26 FitFix16Fix26,

Likelihood-ratio test LR chi2(2) = 49.31 (Assumption: FitFix16Fix26 nested in FitRand16Fix26) 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 6: 5c: Random Time, Random Slope26 Model" Ch 6: 5c: Random Time, Random Slope26 Model

. mixed rt c.time1 c.slope26, /// > || personid: time1 slope26, variance reml covariance(unstructured) /// > residuals(independent,t(session)), Note: t() not required for this residual structure; ignored

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -4154.8797 (not concave) Iteration 1: log restricted-likelihood = -4153.1166 Iteration 2: log restricted-likelihood = -4143.8006 Iteration 3: log restricted-likelihood = -4141.8746 Iteration 4: log restricted-likelihood = -4137.7303 Iteration 5: log restricted-likelihood = -4137.6872 Iteration 6: log restricted-likelihood = -4137.6872

Computing standard errors:

Mixed-effects REML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(2) = 73.15 Log restricted-likelihood = -4137.6872 Prob > chi2 = 0.0000

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- time1 | -163.644 30.21889 -5.42 0.000 -222.8719 -104.416 slope26 | 130.7508 32.55304 4.02 0.000 66.94804 194.5536 _cons | 1961.893 54.68051 35.88 0.000 1854.722 2069.065 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Unstructured | var(time1) | 63954.53 13246.07 42616.04 95977.52 var(slope26) | 69916.44 15434.44 45359.87 107767.2 var(_cons) | 284312.8 42738.48 211759.1 381725.1 cov(time1,slope26) | -65626.84 14155.3 -93370.72 -37882.96 cov(time1,_cons) | -54270.24 18252.61 -90044.69 -18495.79 cov(slope26,_cons) | 43626.45 19072.94 6244.168 81008.74 -----------------------------+------------------------------------------------ var(Residual) | 17673 1435.833 15071.44 20723.62 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 913.11 Prob > chi2 = 0.0000

Note: LR test is conservative and provided only for reference.

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4137.687 10 8295.374 8321.526 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat recovariance, relevel(personid),

Random-effects covariance matrix for level personid

| time1 slope26 _cons -------------+--------------------------------- time1 | 63954.53 slope26 | -65626.84 69916.44 _cons | -54270.24 43626.45 284312.8

. estat recovariance, relevel(personid) correlation,

Random-effects correlation matrix for level personid

| time1 slope26 _cons -------------+--------------------------------- time1 | 1 slope26 | -.9814229 1 _cons | -.4024648 .3094298 1

. estat wcorrelation, covariance,

Covariances for personid = 101:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 3.0e+05 2.3e+05 2.2e+05 2.1e+05 2.0e+05 1.9e+05 2 | 2.3e+05 2.6e+05 2.3e+05 2.2e+05 2.0e+05 1.9e+05 3 | 2.2e+05 2.3e+05 2.4e+05 2.1e+05 2.0e+05 1.9e+05 4 | 2.1e+05 2.2e+05 2.1e+05 2.2e+05 1.9e+05 1.9e+05 5 | 2.0e+05 2.0e+05 2.0e+05 1.9e+05 2.1e+05 1.8e+05 6 | 1.9e+05 1.9e+05 1.9e+05 1.9e+05 1.8e+05 2.0e+05

. estat wcorrelation,

Standard deviations and correlations for personid = 101:

Standard deviations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ sd | 549.532 507.346 485.165 467.552 455.037 448.049

Correlations:

obs | 1 2 3 4 5 6 -------------+------------------------------------------------ 1 | 1.000 2 | 0.825 1.000 3 | 0.823 0.924 1.000 4 | 0.812 0.907 0.917 1.000 5 | 0.792 0.878 0.898 0.911 1.000 6 | 0.761 0.838 0.868 0.892 0.907 1.000

. * Intercept at Session=1 Time=0 . lincom _cons*1 + c.time1*0 + c.slope26*0

( 1) [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1961.893 54.68051 35.88 0.000 1854.722 2069.065 ------------------------------------------------------------------------------

. * Intercept at Session=2 Time=1 . lincom _cons*1 + c.time1*1 + c.slope26*0

( 1) [rt]time1 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1798.249 49.78475 36.12 0.000 1700.673 1895.826 ------------------------------------------------------------------------------

. * Intercept at Session=3 Time=2 . lincom _cons*1 + c.time1*2 + c.slope26*1

( 1) 2*[rt]time1 + [rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1765.356 46.98997 37.57 0.000 1673.258 1857.455 ------------------------------------------------------------------------------

. * Intercept at Session=4 Time=3 . lincom _cons*1 + c.time1*3 + c.slope26*2

( 1) 3*[rt]time1 + 2*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1732.463 44.99353 38.50 0.000 1644.277 1820.649 ------------------------------------------------------------------------------

. * Intercept at Session=5 Time=4 . lincom _cons*1 + c.time1*4 + c.slope26*3

( 1) 4*[rt]time1 + 3*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1699.57 43.90445 38.71 0.000 1613.519 1785.621 ------------------------------------------------------------------------------

. * Intercept at Session=6 Time=5 . lincom _cons*1 + c.time1*5 + c.slope26*4

( 1) 5*[rt]time1 + 4*[rt]slope26 + [rt]_cons = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1666.677 43.7905 38.06 0.000 1580.849 1752.505 ------------------------------------------------------------------------------

. * Rate of change from session 2 to 6 . lincom c.time1*1 + c.slope26*1

( 1) [rt]time1 + [rt]slope26 = 0

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -32.89317 6.588756 -4.99 0.000 -45.80689 -19.97944 ------------------------------------------------------------------------------

. estimates store FitRand16Rand26,

. lrtest FitRand16Rand26 FitRand16Fix26,

Likelihood-ratio test LR chi2(3) = 58.01 (Assumption: FitRand16Fix26 nested in FitRand16Ra~26) 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 6: 0: Saturated Means, Unstructured Variance Model" Ch 6: 0: Saturated Means, Unstructured Variance Model

. display as result "Using ML Instead of REML" Using ML Instead of REML

. mixed rt i.session, /// > || personid: , noconstant variance mle covariance(unstructured) /// > residuals(unstructured,t(session)),

Obtaining starting values by EM:

Performing gradient-based optimization:

Iteration 0: log likelihood = -4606.4947 (not concave) Iteration 1: log likelihood = -4228.9442 (not concave) Iteration 2: log likelihood = -4192.7953 Iteration 3: log likelihood = -4154.9762 Iteration 4: log likelihood = -4139.4083 Iteration 5: log likelihood = -4139.0458 Iteration 6: log likelihood = -4139.0444 Iteration 7: log likelihood = -4139.0444

Computing standard errors:

Mixed-effects ML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(5) = 84.44 Log likelihood = -4139.0444 Prob > chi2 = 0.0000

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- session | 2 | -146.721 29.67288 -4.94 0.000 -204.8788 -88.56321 3 | -211.8587 31.21012 -6.79 0.000 -273.0294 -150.688 4 | -244.0969 33.47577 -7.29 0.000 -309.7082 -178.4856 5 | -254.7176 35.66764 -7.14 0.000 -324.6249 -184.8103 6 | -289.7574 32.53768 -8.91 0.000 -353.53 -225.9847 | _cons | 1961.893 54.4089 36.06 0.000 1855.254 2068.533 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: (empty) | -----------------------------+------------------------------------------------ Residual: Unstructured | var(e1) | 298993.1 42064.31 226938.7 393925.2 var(e2) | 256583 36093.01 194756.1 338037.3 var(e3) | 231056.4 32501.71 175381.2 304405.7 var(e4) | 215388.9 30298.22 163488.4 283765.6 var(e5) | 209996.8 29540.36 159394.6 276663.4 var(e6) | 194784.5 27400.15 147848.4 256620.9 cov(e1,e2) | 233323.8 36022.3 162721.4 303926.2 cov(e1,e3) | 215834.1 33827.79 149532.9 282135.4 cov(e1,e4) | 200599.3 32174.04 137539.4 263659.3 cov(e1,e5) | 190249.8 31291.76 128919.1 251580.6 cov(e1,e6) | 193424.4 30761.66 133132.7 253716.1 cov(e2,e3) | 227936.2 33173.66 162917 292955.4 cov(e2,e4) | 211119.4 31426.76 149524.1 272714.7 cov(e2,e5) | 200090.1 30480.41 140349.6 259830.6 cov(e2,e6) | 191353.6 29267.63 133990.1 248717.1 cov(e3,e4) | 203176.2 30011.63 144354.5 261997.9 cov(e3,e5) | 194968 29257.95 137623.5 252312.5 cov(e3,e6) | 186736.1 28109.72 131642 241830.1 cov(e4,e5) | 191757.2 28482.16 135933.1 247581.2 cov(e4,e6) | 183485.2 27351.31 129877.6 237092.8 cov(e5,e6) | 185979.7 27328.79 132416.2 239543.2 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(20) = 934.90 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(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4139.044 27 8332.089 8402.697 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estimates store FitMLSatUN,

. . display as result "Ch 6: 1b: Empty Means, Random Intercept Model" Ch 6: 1b: Empty Means, Random Intercept Model

. display as result "Using ML Instead of REML" Using ML Instead of REML

. mixed rt , /// > || personid: , variance mle covariance(unstructured) /// > residuals(independent,t(session)), 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 likelihood = -4273.1628 Iteration 1: log likelihood = -4273.1628

Computing standard errors:

Mixed-effects ML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(0) = . Log likelihood = -4273.1628 Prob > chi2 = .

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | 1770.701 45.19521 39.18 0.000 1682.12 1859.282 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Identity | var(_cons) | 198820 29034.73 149332.6 264707.1 -----------------------------+------------------------------------------------ var(Residual) | 44899.96 2825.63 39689.76 50794.13 ------------------------------------------------------------------------------ LR test vs. linear regression: chibar2(01) = 690.12 Prob >= chibar2 = 0.0000

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4273.163 3 8552.326 8560.171 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estat icc,

Intraclass correlation

------------------------------------------------------------------------------ Level | ICC Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid | .8157723 .0240389 .7639505 .8583271 ------------------------------------------------------------------------------

. estimates store FitMLEmptyRI,

. lrtest FitMLSatUN FitMLEmptyRI,

Likelihood-ratio test LR chi2(24) = 268.24 (Assumption: FitMLEmptyRI nested in FitMLSatUN) 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.

. . display as result "Ch 6: 3b: Random Quadratic Time Model" Ch 6: 3b: Random Quadratic Time Model

. display as result "Using ML instead of REML" Using ML instead of REML

. mixed rt c.time1 c.time1#c.time1, /// > || personid: time1 time1sq, variance mle covariance(unstructured) /// > residuals(independent,t(session)), Note: t() not required for this residual structure; ignored

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log likelihood = -4163.25 Iteration 1: log likelihood = -4161.2927 Iteration 2: log likelihood = -4160.8836 Iteration 3: log likelihood = -4160.8833

Computing standard errors:

Mixed-effects ML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(2) = 72.45 Log likelihood = -4160.8833 Prob > chi2 = 0.0000

--------------------------------------------------------------------------------- rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] ----------------+---------------------------------------------------------------- time1 | -120.8999 19.94803 -6.06 0.000 -159.9973 -81.80251 | c.time1#c.time1 | 13.86561 3.398459 4.08 0.000 7.204756 20.52647 | _cons | 1945.85 53.58259 36.31 0.000 1840.83 2050.87 ---------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Unstructured | var(time1) | 25437.86 5781.419 16293.81 39713.52 var(time1sq) | 622.8 169.99 364.7687 1063.358 var(_cons) | 273306.9 40831.76 203930.4 366285.1 cov(time1,time1sq) | -3837.723 968.8047 -5736.545 -1938.9 cov(time1,_cons) | -35261.67 11771.5 -58333.38 -12189.95 cov(time1sq,_cons) | 3845.378 1921.468 79.37031 7611.386 -----------------------------+------------------------------------------------ var(Residual) | 20298.2 1649.119 17310.2 23801.98 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 891.99 Prob > chi2 = 0.0000

Note: LR test is conservative and provided only for reference.

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4160.883 10 8341.767 8367.918 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estimates store FitMLRandQuad,

. lrtest FitMLRandQuad FitMLEmptyRI,

Likelihood-ratio test LR chi2(7) = 224.56 (Assumption: FitMLEmptyRI nested in FitMLRandQuad) 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.

. lrtest FitMLSatUN FitMLRandQuad,

Likelihood-ratio test LR chi2(17) = 43.68 (Assumption: FitMLRandQuad nested in FitMLSatUN) Prob > chi2 = 0.0004

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.

. . display as result "Ch 6: 4c: Random Slope12, Random Slope26 Model" Ch 6: 4c: Random Slope12, Random Slope26 Model

. display as result "Using ML instead of REML" Using ML instead of REML

. mixed rt c.slope12 c.slope26, /// > || personid: slope12 slope26, variance mle covariance(unstructured) /// > residuals(independent,t(session)), Note: t() not required for this residual structure; ignored

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log likelihood = -4149.4821 Iteration 1: log likelihood = -4149.4733 Iteration 2: log likelihood = -4149.4733

Computing standard errors:

Mixed-effects ML regression Number of obs = 606 Group variable: personid Number of groups = 101

Obs per group: min = 6 avg = 6.0 max = 6



Wald chi2(2) = 73.88 Log likelihood = -4149.4733 Prob > chi2 = 0.0000

------------------------------------------------------------------------------ rt | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- slope12 | -163.644 30.06887 -5.44 0.000 -222.5779 -104.7101 slope26 | -32.89317 6.556056 -5.02 0.000 -45.7428 -20.04353 _cons | 1961.893 54.40913 36.06 0.000 1855.253 2068.533 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ personid: Unstructured | var(slope12) | 63041.03 13053.94 42011.15 94598.01 var(slope26) | 2573.867 627.5353 1596.079 4150.666 var(_cons) | 281322.7 42099.28 209809.1 377211.6 cov(slope12,slope26) | -1620.742 2066.603 -5671.209 2429.725 cov(slope12,_cons) | -53557.65 17962.22 -88762.96 -18352.34 cov(slope26,_cons) | -10538.41 3735.149 -17859.17 -3217.655 -----------------------------+------------------------------------------------ var(Residual) | 17673.02 1435.834 15071.46 20723.64 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 914.40 Prob > chi2 = 0.0000

Note: LR test is conservative and provided only for reference.

. estat ic, n(101),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 101 . -4149.473 10 8318.947 8345.098 ----------------------------------------------------------------------------- Note: N=101 used in calculating BIC

. estimates store FitMLRand12Rand26,

. lrtest FitMLRand12Rand26 FitMLEmptyRI,

Likelihood-ratio test LR chi2(7) = 247.38 (Assumption: FitMLEmptyRI nested in FitMLRand12~26) 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.

. lrtest FitMLSatUN FitMLRand12Rand26,

Likelihood-ratio test LR chi2(17) = 20.86 (Assumption: FitMLRand12~26 nested in FitMLSatUN) Prob > chi2 = 0.2327

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.

. . ****** END CHAPTER 6 MODELS ****** . . * Close log . log close STATA_Chapter6 name: STATA_Chapter6 log: C:\Dropbox\PilesOfVariance\Chapter6\STATA\STATA_Chapter6_Output.smcl log type: smcl closed on: 6 Jan 2015, 12:53:50 ------------------------------------------------------------------------------------------------------------------------------------------------------