------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  STATA_Chapter11a
       log:  C:\Dropbox\PilesOfVariance\Chapter11a\STATA\STATA_Chapter11a_Output.smcl
  log type:  smcl
 opened on:  25 Oct 2014, 10:58:42


. . display as result "Chapter 11a: Descriptive Statistics for Level-1 Time-Varying Student Variables" Chapter 11a: Descriptive Statistics for Level-1 Time-Varying Student Variables

. summarize close wsclose victim wsvictim

Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- close | 1731 4.210851 .9523782 1 6.548531 wsclose | 1731 -1.38e-09 .5205383 -2.660683 2.933366 victim | 1731 3.125746 .9910959 1.287009 6 wsvictim | 1731 2.00e-09 .4747601 -2.333333 2.191727

. . display as result "Chapter 11a: Descriptive Statistics for Level-1 Time-Varying Class Variables" Chapter 11a: Descriptive Statistics for Level-1 Time-Varying Class Variables

. preserve

. collapse emosup wcemosup, by(classid wave)

. summarize emosup wcemosup

Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- emosup | 99 4.988674 .7390299 2.96875 6.25 wcemosup | 99 -4.33e-08 .4279964 -1.520833 1.197917

. restore

. . display as result "Chapter 11a: Descriptive Statistics for Level-2 Student Variables" Chapter 11a: Descriptive Statistics for Level-2 Student Variables

. preserve

. collapse smclose wcclose smvictim wcvictim girl, by(studentid)

. summarize smclose wcclose smvictim wcvictim girl

Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- smclose | 597 4.202576 .8047855 1 5.648392 wcclose | 597 4.03e-08 .7302906 -2.79774 1.795455 smvictim | 597 3.126966 .8739274 1.669983 6 wcvictim | 597 -1.50e-08 .8320328 -1.632721 2.664469 girl | 597 .4974874 .500413 0 1

. restore

. . display as result "Chapter 11a: Descriptive Statistics for Level-3 Class Variables" Chapter 11a: Descriptive Statistics for Level-3 Class Variables

. preserve

. collapse cmclose cmvictim cmemosup cmgirl classsize grade35, by(classid)

. summarize cmclose cmvictim cmemosup cmgirl classsize grade35

Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- cmclose | 33 4.216702 .3561585 3.353593 4.93776 cmvictim | 33 3.13456 .2782486 2.498855 3.695232 cmemosup | 33 4.988674 .6087253 3.645833 5.875 cmgirl | 33 .5007654 .1036019 .2941177 .7647059 classsize | 33 23.09091 2.650043 19 29 -------------+-------------------------------------------------------- grade35 | 33 .6060606 .4961977 0 1

. restore

. . display as result "Ch 11a: Empty Means, Two-Level Model Predicting Student-Teacher Closeness" Ch 11a: Empty Means, Two-Level Model Predicting Student-Teacher Closeness

. display as result "Occasions Within Students*Classes" Occasions Within Students*Classes

. mixed close , /// > || classid: , noconstant variance reml covariance(unstructured) /// > || studentid: , covariance(unstructured), Note: single-variable random-effects specification in studentid equation; covariance structure set to identity

Performing EM optimization:

Performing gradient-based optimization:

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

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

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

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | 4.204977 .0328287 128.09 0.000 4.140634 4.26932 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: (empty) | -----------------------------+------------------------------------------------ studentid: Identity | var(_cons) | .4985171 .037869 .4295562 .5785491 -----------------------------+------------------------------------------------ var(Residual) | .4139536 .0174051 .3812079 .4495121 ------------------------------------------------------------------------------ LR test vs. linear regression: chibar2(01) = 464.64 Prob >= chibar2 = 0.0000

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2141.758 3 4289.517 4294.006 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estimates store FitEmpty2C,

. . display as result "Eq 11a.1: Empty Means, Three-Level Model Predicting Student-Teacher Closeness" Eq 11a.1: Empty Means, Three-Level Model Predicting Student-Teacher Closeness

. display as result "Level-1 Occasions Within Level-2 Students Within Level-3 Classes" Level-1 Occasions Within Level-2 Students Within Level-3 Classes

. mixed close , /// > || classid: , variance reml covariance(unstructured) /// > || studentid: , covariance(unstructured), Note: single-variable random-effects specification in classid equation; covariance structure set to identity Note: single-variable random-effects specification in studentid equation; covariance structure set to identity

Performing EM optimization:

Performing gradient-based optimization:

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

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

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

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | 4.214604 .0607381 69.39 0.000 4.09556 4.333648 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Identity | var(_cons) | .090089 .030923 .0459724 .1765413 -----------------------------+------------------------------------------------ studentid: Identity | var(_cons) | .4137517 .0339837 .3522296 .4860194 -----------------------------+------------------------------------------------ var(Residual) | .4142198 .0174257 .3814361 .4498212 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(2) = 504.63 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2121.766 4 4251.531 4257.517 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estat icc,

Intraclass correlation

------------------------------------------------------------------------------ Level | ICC Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid | .0981297 .0308472 .0520876 .1772596 studentid|classid | .5488099 .0254748 .4985557 .5980877 ------------------------------------------------------------------------------

. estimates store FitEmpty3C,

. lrtest FitEmpty3C FitEmpty2C,

Likelihood-ratio test LR chi2(1) = 39.99 (Assumption: FitEmpty2C nested in FitEmpty3C) 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 11a: Empty Means, Two-Level Model Predicting Student-Perceived Victimization" Ch 11a: Empty Means, Two-Level Model Predicting Student-Perceived Victimization

. display as result "Occasions Within Students*Classes" Occasions Within Students*Classes

. mixed victim , /// > || classid: , noconstant variance reml covariance(unstructured) /// > || studentid: , covariance(unstructured), Note: single-variable random-effects specification in studentid equation; covariance structure set to identity

Performing EM optimization:

Performing gradient-based optimization:

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

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

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

------------------------------------------------------------------------------ victim | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | 3.126832 .0357327 87.51 0.000 3.056798 3.196867 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: (empty) | -----------------------------+------------------------------------------------ studentid: Identity | var(_cons) | .6416285 .0444618 .5601437 .734967 -----------------------------+------------------------------------------------ var(Residual) | .3439643 .0144474 .3167822 .3734789 ------------------------------------------------------------------------------ LR test vs. linear regression: chibar2(01) = 711.75 Prob >= chibar2 = 0.0000

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2087.142 3 4180.283 4184.773 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estimates store FitEmpty2V,

. . display as result "Eq 11a.1: Empty Means, Three-Level Model Predicting Student-Perceived Victimization" Eq 11a.1: Empty Means, Three-Level Model Predicting Student-Perceived Victimization

. display as result "Level-1 Occasions Within Level-2 Students Within Level-3 Classes" Level-1 Occasions Within Level-2 Students Within Level-3 Classes

. mixed victim , /// > || classid: , variance reml covariance(unstructured) /// > || studentid: , covariance(unstructured), Note: single-variable random-effects specification in classid equation; covariance structure set to identity Note: single-variable random-effects specification in studentid equation; covariance structure set to identity

Performing EM optimization:

Performing gradient-based optimization:

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

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

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

------------------------------------------------------------------------------ victim | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | 3.130655 .0472339 66.28 0.000 3.038078 3.223231 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Identity | var(_cons) | .0326219 .0189171 .010469 .1016509 -----------------------------+------------------------------------------------ studentid: Identity | var(_cons) | .6107044 .0438868 .5304709 .7030732 -----------------------------+------------------------------------------------ var(Residual) | .3439396 .0144455 .3167608 .3734503 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(2) = 717.70 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2084.167 4 4176.333 4182.319 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estat icc,

Intraclass correlation

------------------------------------------------------------------------------ Level | ICC Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid | .0330426 .0187858 .010679 .0976182 studentid|classid | .6516242 .0195306 .6124357 .6888632 ------------------------------------------------------------------------------

. estimates store FitEmpty3V,

. lrtest FitEmpty3V FitEmpty2V,

Likelihood-ratio test LR chi2(1) = 5.95 (Assumption: FitEmpty2V nested in FitEmpty3V) Prob > chi2 = 0.0147

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 "Eq 11a.1: Empty Means, Levels 1 and 3 Model Predicting Class Emotional Support" Eq 11a.1: Empty Means, Levels 1 and 3 Model Predicting Class Emotional Support

. display as result "Level-1 Ocasions Within Level-3 Classes" Level-1 Ocasions Within Level-3 Classes

. mixed emosup , /// > || classid: , variance reml covariance(unstructured), Note: single-variable random-effects specification in classid equation; covariance structure set to identity

Performing EM optimization:

Performing gradient-based optimization:

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

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731 Group variable: classid Number of groups = 33

Obs per group: min = 27 avg = 52.5 max = 73



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

------------------------------------------------------------------------------ emosup | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | 4.98827 .1068482 46.69 0.000 4.778851 5.197688 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Identity | var(_cons) | .3732063 .0942079 .2275524 .6120918 -----------------------------+------------------------------------------------ var(Residual) | .1788264 .0061373 .1671931 .1912691 ------------------------------------------------------------------------------ LR test vs. linear regression: chibar2(01) = 1734.37 Prob >= chibar2 = 0.0000

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -1044.518 3 2095.036 2099.526 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estat icc,

Intraclass correlation

------------------------------------------------------------------------------ Level | ICC Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid | .6760583 .0558014 .5588073 .7747114 ------------------------------------------------------------------------------

. estimates store FitEmpty3E,

. . display as result "Eq 11a.1: Empty Means, Levels 1 and 3 Model Predicting Class Emotional Support" Eq 11a.1: Empty Means, Levels 1 and 3 Model Predicting Class Emotional Support

. display as result "Level-1 Ocasions Within Level-3 Classes" Level-1 Ocasions Within Level-3 Classes

. preserve

. collapse emosup time1, by(classid wave)

. mixed emosup , /// > || classid: , variance reml covariance(unstructured), Note: single-variable random-effects specification in classid equation; covariance structure set to identity

Performing EM optimization:

Performing gradient-based optimization:

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

Computing standard errors:

Mixed-effects REML regression Number of obs = 99 Group variable: classid Number of groups = 33

Obs per group: min = 3 avg = 3.0 max = 3



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

------------------------------------------------------------------------------ emosup | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | 4.988674 .1059655 47.08 0.000 4.780986 5.196363 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Identity | var(_cons) | .2798812 .0939715 .1449368 .5404666 -----------------------------+------------------------------------------------ var(Residual) | .2719959 .0473484 .1933691 .3825934 ------------------------------------------------------------------------------ LR test vs. linear regression: chibar2(01) = 23.27 Prob >= chibar2 = 0.0000

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -100.082 3 206.1639 210.6534 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estat icc,

Intraclass correlation

------------------------------------------------------------------------------ Level | ICC Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid | .5071441 .1008095 .3182307 .6940392 ------------------------------------------------------------------------------

. restore

. . display as result "Eq 11a.3: Saturated Means, Unstructured Level-3 and Level-2 Variances" Eq 11a.3: Saturated Means, Unstructured Level-3 and Level-2 Variances

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close i.wave, /// > || classid: w1 w2 w3, noconstant variance reml covariance(unstructured) /// > || studentid: , noconstant covariance(unstructured) /// > residuals(unstructured,t(wave)),

Obtaining starting values by EM:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2288.0968 (not concave) Iteration 1: log restricted-likelihood = -2074.417 (not concave) Iteration 2: log restricted-likelihood = -2074.2266 Iteration 3: log restricted-likelihood = -2066.4566 (not concave) Iteration 4: log restricted-likelihood = -2066.2954 (not concave) Iteration 5: log restricted-likelihood = -2065.8375 Iteration 6: log restricted-likelihood = -2065.5286 Iteration 7: log restricted-likelihood = -2065.5253 Iteration 8: log restricted-likelihood = -2065.5253

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(2) = 15.92 Log restricted-likelihood = -2065.5253 Prob > chi2 = 0.0003

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- wave | 2 | -.1368013 .0489151 -2.80 0.005 -.2326731 -.0409296 3 | -.2605125 .0653148 -3.99 0.000 -.3885271 -.1324978 | _cons | 4.345276 .04643 93.59 0.000 4.254275 4.436277 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(w1) | .0297067 .0178174 .0091691 .0962464 var(w2) | .0965902 .0362844 .046257 .2016923 var(w3) | .2024178 .0642414 .1086682 .3770464 cov(w1,w2) | .0442135 .0217491 .001586 .0868409 cov(w1,w3) | .070754 .0292178 .0134881 .1280199 cov(w2,w3) | .1352986 .0449471 .0472039 .2233933 -----------------------------+------------------------------------------------ studentid: (empty) | -----------------------------+------------------------------------------------ Residual: Unstructured | var(e1) | .7210215 .0438317 .6400336 .8122574 var(e2) | .7913802 .0478287 .702977 .8909007 var(e3) | .8891754 .0541996 .7890464 1.002011 cov(e1,e2) | .4051511 .0368296 .3329665 .4773357 cov(e1,e3) | .3795776 .0384376 .3042413 .4549138 cov(e2,e3) | .4990276 .0419677 .4167725 .5812827 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(11) = 602.37 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2065.525 15 4161.051 4183.498 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estat recovariance, relevel(classid),

Random-effects covariance matrix for level classid

| w1 w2 w3 -------------+--------------------------------- w1 | .0297067 w2 | .0442135 .0965902 w3 | .070754 .1352986 .2024178

. estat recovariance, relevel(classid) correlation,

Random-effects correlation matrix for level classid

| w1 w2 w3 -------------+--------------------------------- w1 | 1 w2 | .825393 1 w3 | .9124295 .9676143 1

. estat wcorrelation, covariance,

Covariances for classid = 130231 studentid = 5023101:

wave | 1 2 3 -------------+------------------------ 1 | 0.751 2 | 0.449 0.888 3 | 0.450 0.634 1.092

. estat wcorrelation,

Standard deviations and correlations for classid = 130231 studentid = 5023101:

Standard deviations:

wave | 1 2 3 -------------+------------------------ sd | 0.866 0.942 1.045

Correlations:

wave | 1 2 3 -------------+------------------------ 1 | 1.000 2 | 0.550 1.000 3 | 0.497 0.644 1.000

. contrast i.wave,

Contrasts of marginal linear predictions

Margins : asbalanced

------------------------------------------------ | df chi2 P>chi2 -------------+---------------------------------- close | wave | 2 15.92 0.0003 ------------------------------------------------

. margins i.wave,

Adjusted predictions Number of obs = 1731

Expression : Linear prediction, fixed portion, predict()

------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- wave | 1 | 4.345276 .04643 93.59 0.000 4.254275 4.436277 2 | 4.208475 .0655269 64.23 0.000 4.080044 4.336905 3 | 4.084763 .0877575 46.55 0.000 3.912762 4.256765 ------------------------------------------------------------------------------

. margins i.wave, pwcompare(pveffects)

Pairwise comparisons of adjusted predictions

Expression : Linear prediction, fixed portion, predict()

----------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. z P>|z| -------------+--------------------------------------- wave | 2 vs 1 | -.1368013 .0489151 -2.80 0.005 3 vs 1 | -.2605125 .0653148 -3.99 0.000 3 vs 2 | -.1237111 .0454735 -2.72 0.007 -----------------------------------------------------

. estimates store FitSatUNC,

. . display as result "Ch 11a: Piecewise Means, Level-3 and Level-2 Random Intercepts" Ch 11a: Piecewise Means, Level-3 and Level-2 Random Intercepts

. display as result "Three-Level Model Predicting Student Closeness" Three-Level Model Predicting Student Closeness

. mixed close c.time1 c.w3, /// > || classid: , variance reml covariance(unstructured) /// > || studentid: , covariance(unstructured), Note: single-variable random-effects specification in classid equation; covariance structure set to identity Note: single-variable random-effects specification in studentid equation; covariance structure set to identity

Performing EM optimization:

Performing gradient-based optimization:

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

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(2) = 51.00 Log restricted-likelihood = -2101.647 Prob > chi2 = 0.0000

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- time1 | -.143003 .0372953 -3.83 0.000 -.2161005 -.0699055 w3 | .0184855 .0643816 0.29 0.774 -.1077001 .1446712 _cons | 4.351958 .0645731 67.40 0.000 4.225397 4.478519 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Identity | var(_cons) | .0903768 .0309587 .0461824 .1768631 -----------------------------+------------------------------------------------ studentid: Identity | var(_cons) | .4189882 .0338924 .3575586 .4909716 -----------------------------+------------------------------------------------ var(Residual) | .3972739 .0167261 .3658075 .431447 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(2) = 530.13 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2101.647 6 4215.294 4224.273 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estimates store FitPieceRI2RI3C,

. . display as result "Ch 11a: Piecewise Means, Add Level-2 Random Time Slope" Ch 11a: Piecewise Means, Add Level-2 Random Time Slope

. display as result "Three-Level Model Predicting Student Closeness" Three-Level Model Predicting Student Closeness

. mixed close c.time1 c.w3, /// > || classid: , variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured), Note: single-variable random-effects specification in classid equation; covariance structure set to identity

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2086.5082 Iteration 1: log restricted-likelihood = -2085.6492 Iteration 2: log restricted-likelihood = -2085.647 Iteration 3: log restricted-likelihood = -2085.647

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(2) = 43.65 Log restricted-likelihood = -2085.647 Prob > chi2 = 0.0000

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- time1 | -.1439181 .0355934 -4.04 0.000 -.2136798 -.0741563 w3 | .0200893 .0584592 0.34 0.731 -.0944887 .1346672 _cons | 4.352097 .0583559 74.58 0.000 4.237721 4.466472 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Identity | var(_cons) | .0701676 .0262911 .0336667 .1462424 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0713313 .0170847 .0446075 .1140651 var(_cons) | .4018071 .0438926 .3243651 .4977383 cov(time1,_cons) | -.0112388 .0216841 -.0537388 .0312613 -----------------------------+------------------------------------------------ var(Residual) | .3260023 .0194353 .2900512 .3664095 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(4) = 562.13 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2085.647 8 4187.294 4199.266 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estimates store FitPieceRL2RI3C,

. lrtest FitPieceRL2RI3C FitPieceRI2RI3C,

Likelihood-ratio test LR chi2(2) = 32.00 (Assumption: FitPieceRI2~3C nested in FitPieceRL2~3C) 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 11a: Piecewise Means, Add Level-3 Random Time Slope" Ch 11a: Piecewise Means, Add Level-3 Random Time Slope

. display as result "Three-Level Model Predicting Student Closeness" Three-Level Model Predicting Student Closeness

. mixed close c.time1 c.w3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2068.5745 Iteration 1: log restricted-likelihood = -2066.9266 Iteration 2: log restricted-likelihood = -2066.9222 Iteration 3: log restricted-likelihood = -2066.9222

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(2) = 15.95 Log restricted-likelihood = -2066.9222 Prob > chi2 = 0.0003

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- time1 | -.1391551 .0438713 -3.17 0.002 -.2251413 -.0531689 w3 | .0179229 .0584907 0.31 0.759 -.0967168 .1325626 _cons | 4.34612 .0457053 95.09 0.000 4.256539 4.435701 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0227547 .0089228 .0105509 .0490743 var(_cons) | .0269188 .0166207 .0080258 .0902863 cov(time1,_cons) | .0212777 .0088718 .0038892 .0386662 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0490807 .0163921 .0255049 .094449 var(_cons) | .4059951 .0444473 .3275922 .5031623 cov(time1,_cons) | -.0056104 .0206536 -.0460906 .0348699 -----------------------------+------------------------------------------------ var(Residual) | .3266192 .0194754 .2905941 .3671103 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 599.58 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2066.922 10 4153.844 4168.809 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estimates store FitPieceRL2RL3C,

. lrtest FitPieceRL2RL3C FitPieceRL2RI3C, force

Likelihood-ratio test LR chi2(2) = 37.45 (Assumption: FitPieceRL2~3C nested in FitPieceRL2~3C) Prob > chi2 = 0.0000

. lrtest FitSatUNC FitPieceRL2RL3C, force

Likelihood-ratio test LR chi2(5) = 2.79 (Assumption: FitPieceRL2~3C nested in FitSatUNC) Prob > chi2 = 0.7317

. . display as result "Eq 11a.4: Unconditional Growth Model Predicting Student Closeness" Eq 11a.4: Unconditional Growth Model Predicting Student Closeness

. display as result "Random Linear Time Slopes for Level-2 Students and Level-3 Classes" Random Linear Time Slopes for Level-2 Students and Level-3 Classes

. mixed close c.time1, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2066.6866 Iteration 1: log restricted-likelihood = -2065.0531 Iteration 2: log restricted-likelihood = -2065.0489 Iteration 3: log restricted-likelihood = -2065.0489

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(1) = 15.85 Log restricted-likelihood = -2065.0489 Prob > chi2 = 0.0001

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- time1 | -.1301887 .0327026 -3.98 0.000 -.1942846 -.0660928 _cons | 4.343067 .044611 97.35 0.000 4.255631 4.430503 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0227654 .0089245 .0105581 .0490867 var(_cons) | .026921 .0166226 .0080262 .0902968 cov(time1,_cons) | .021271 .0088733 .0038797 .0386623 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0492919 .0163738 .0257053 .0945207 var(_cons) | .406431 .0444376 .3280347 .5035632 cov(time1,_cons) | -.0058264 .0206408 -.0462817 .0346289 -----------------------------+------------------------------------------------ var(Residual) | .3261214 .0194291 .2901803 .3665141 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 600.59 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2065.049 9 4148.098 4161.566 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. predict PredUncC, xb,

. corr close PredUncC (obs=1731)

| close PredUncC -------------+------------------ close | 1.0000 PredUncC | 0.1144 1.0000



. . display as result "Ch 11a: Add Class Grade and Class Size" Ch 11a: Add Class Grade and Class Size

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close c.time1 c.grade35 c.time1#c.grade35 c.size23 c.time1#c.size23, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2073.7389 Iteration 1: log restricted-likelihood = -2072.1464 Iteration 2: log restricted-likelihood = -2072.1413 Iteration 3: log restricted-likelihood = -2072.1413

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(5) = 22.43 Log restricted-likelihood = -2072.1413 Prob > chi2 = 0.0004

----------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] ------------------+---------------------------------------------------------------- time1 | -.1490167 .052298 -2.85 0.004 -.2515188 -.0465146 grade35 | .0456254 .0913458 0.50 0.617 -.133409 .2246597 | c.time1#c.grade35 | .0343474 .0676659 0.51 0.612 -.0982753 .1669702 | size23 | -.0326321 .0170279 -1.92 0.055 -.0660062 .000742 | c.time1#c.size23 | -.0223696 .0125907 -1.78 0.076 -.0470469 .0023078 | _cons | 4.319969 .0707404 61.07 0.000 4.18132 4.458617 -----------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0215429 .0088356 .0096425 .0481299 var(_cons) | .0231116 .0164202 .0057422 .0930221 cov(time1,_cons) | .0168258 .0086106 -.0000507 .0337023 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .049155 .0163718 .0255895 .0944221 var(_cons) | .4067145 .0444897 .3282302 .5039655 cov(time1,_cons) | -.0058319 .0206524 -.0463098 .034646 -----------------------------+------------------------------------------------ var(Residual) | .3262441 .0194403 .2902828 .3666605 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 566.44 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2072.141 13 4170.283 4189.737 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Add Class Size Only" Ch 11a: Add Class Size Only

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close c.time1 c.size23 c.time1#c.size23, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2070.7188 Iteration 1: log restricted-likelihood = -2069.0988 Iteration 2: log restricted-likelihood = -2069.0944 Iteration 3: log restricted-likelihood = -2069.0944

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(3) = 22.45 Log restricted-likelihood = -2069.0944 Prob > chi2 = 0.0001

---------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -----------------+---------------------------------------------------------------- time1 | -.1281179 .0318347 -4.02 0.000 -.1905127 -.0657231 size23 | -.0308692 .0164621 -1.88 0.061 -.0631343 .0013959 | c.time1#c.size23 | -.0209519 .0121494 -1.72 0.085 -.0447643 .0028606 | _cons | 4.347624 .0430278 101.04 0.000 4.263291 4.431957 ----------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0207625 .0084904 .0093153 .0462766 var(_cons) | .0218958 .0156698 .0053852 .0890274 cov(time1,_cons) | .0170263 .0082841 .0007898 .0332628 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0491876 .0163712 .0256182 .0944413 var(_cons) | .4065272 .0444625 .3280895 .5037173 cov(time1,_cons) | -.0057963 .0206463 -.0462622 .0346696 -----------------------------+------------------------------------------------ var(Residual) | .3262048 .0194369 .2902496 .3666141 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 570.81 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2069.094 11 4160.189 4176.65 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Test if Level-3 Random Time Slope Variance is still needed" Ch 11a: Test if Level-3 Random Time Slope Variance is still needed

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close c.time1 c.size23 c.time1#c.size23 /// > c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50, /// > || classid: , variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured), Note: single-variable random-effects specification in classid equation; covariance structure set to identity

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2071.2389 Iteration 1: log restricted-likelihood = -2070.0764 Iteration 2: log restricted-likelihood = -2070.0744 Iteration 3: log restricted-likelihood = -2070.0744

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(7) = 97.16 Log restricted-likelihood = -2070.0744 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------------+---------------------------------------------------------------- time1 | -.1260962 .0282015 -4.47 0.000 -.1813701 -.0708224 size23 | -.0280724 .0211898 -1.32 0.185 -.0696037 .0134589 | c.time1#c.size23 | -.023098 .0076109 -3.03 0.002 -.038015 -.0081809 | girl | .2530357 .0685121 3.69 0.000 .1187545 .3873169 | c.time1#c.girl | -.0052884 .0403651 -0.13 0.896 -.0844027 .0738258 | cmgirl50 | .5408728 .55557 0.97 0.330 -.5480244 1.62977 | c.time1#c.cmgirl50 | -.9833433 .2095387 -4.69 0.000 -1.394032 -.5726549 | _cons | 4.223863 .0649471 65.04 0.000 4.096569 4.351157 ------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Identity | var(_cons) | .0622461 .0246968 .0286015 .1354677 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0601222 .0165916 .0350052 .103261 var(_cons) | .3840483 .0427613 .3087522 .4777071 cov(time1,_cons) | -.0047602 .0208342 -.0455944 .0360741 -----------------------------+------------------------------------------------ var(Residual) | .3261116 .0194285 .2901716 .366503 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(4) = 534.90 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2070.074 13 4166.149 4185.603 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Saturated Means, Unstructured Model Predicting Class Emotional Support" Ch 11a: Saturated Means, Unstructured Model Predicting Class Emotional Support

. display as result "Using Only Level-1 Ocasions Within Level-3 Classes" Using Only Level-1 Ocasions Within Level-3 Classes

. preserve

. collapse emosup time1, by(classid wave)

. mixed emosup i.wave, /// > || classid: , noconstant variance reml covariance(unstructured) /// > residuals(unstructured,t(wave)),

Obtaining starting values by EM:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -112.9582 (not concave) Iteration 1: log restricted-likelihood = -101.04382 Iteration 2: log restricted-likelihood = -99.879909 Iteration 3: log restricted-likelihood = -99.597103 Iteration 4: log restricted-likelihood = -99.595989 Iteration 5: log restricted-likelihood = -99.595989

Computing standard errors:

Mixed-effects REML regression Number of obs = 99 Group variable: classid Number of groups = 33

Obs per group: min = 3 avg = 3.0 max = 3



Wald chi2(2) = 1.95 Log restricted-likelihood = -99.595989 Prob > chi2 = 0.3772

------------------------------------------------------------------------------ emosup | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- wave | 2 | .0178788 .1308607 0.14 0.891 -.2386034 .274361 3 | .1608712 .1279319 1.26 0.209 -.0898707 .4116131 | _cons | 4.929091 .1344005 36.67 0.000 4.665671 5.192511 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: (empty) | -----------------------------+------------------------------------------------ Residual: Unstructured | var(e1) | .5960956 .1490239 .3651872 .9730078 var(e2) | .6792288 .1698072 .4161173 1.108706 var(e3) | .3812719 .095318 .2335793 .6223506 cov(e1,e2) | .3551077 .1288151 .1026348 .6075806 cov(e1,e3) | .2186353 .0927152 .0369168 .4003539 cov(e2,e3) | .2654178 .1014608 .0665584 .4642773 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(5) = 26.72 Prob > chi2 = 0.0001

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(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -99.59599 9 217.192 230.6605 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estat wcorrelation, covariance,

Covariances for classid = 130231:

wave | 1 2 3 -------------+------------------------ 1 | 0.596 2 | 0.355 0.679 3 | 0.219 0.265 0.381

. estat wcorrelation,

Standard deviations and correlations for classid = 130231:

Standard deviations:

wave | 1 2 3 -------------+------------------------ sd | 0.772 0.824 0.617

Correlations:

wave | 1 2 3 -------------+------------------------ 1 | 1.000 2 | 0.558 1.000 3 | 0.459 0.522 1.000

. contrast i.wave,

Contrasts of marginal linear predictions

Margins : asbalanced

------------------------------------------------ | df chi2 P>chi2 -------------+---------------------------------- emosup | wave | 2 1.95 0.3772 ------------------------------------------------

. margins i.wave,

Adjusted predictions Number of obs = 99

Expression : Linear prediction, fixed portion, predict()

------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- wave | 1 | 4.929091 .1344005 36.67 0.000 4.665671 5.192511 2 | 4.94697 .1434667 34.48 0.000 4.66578 5.228159 3 | 5.089962 .1074881 47.35 0.000 4.879289 5.300635 ------------------------------------------------------------------------------

. margins i.wave, pwcompare(pveffects)

Pairwise comparisons of adjusted predictions

Expression : Linear prediction, fixed portion, predict()

----------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. z P>|z| -------------+--------------------------------------- wave | 2 vs 1 | .0178788 .1308607 0.14 0.891 3 vs 1 | .1608712 .1279319 1.26 0.209 3 vs 2 | .1429924 .1266904 1.13 0.259 -----------------------------------------------------

. estimates store FitSatUNE,

. restore

. . display as result "Ch 11a: Saturated Means, Random Intercept Model Predicting Class Emotional Support" Ch 11a: Saturated Means, Random Intercept Model Predicting Class Emotional Support

. display as result "Using Only Level-1 Ocasions Within Level-3 Classes" Using Only Level-1 Ocasions Within Level-3 Classes

. preserve

. collapse emosup time1, by(classid wave)

. mixed emosup i.wave, /// > || classid: , variance reml covariance(unstructured), Note: single-variable random-effects specification in classid equation; covariance structure set to identity

Performing EM optimization:

Performing gradient-based optimization:

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

Computing standard errors:

Mixed-effects REML regression Number of obs = 99 Group variable: classid Number of groups = 33

Obs per group: min = 3 avg = 3.0 max = 3



Wald chi2(2) = 1.88 Log restricted-likelihood = -101.54997 Prob > chi2 = 0.3900

------------------------------------------------------------------------------ emosup | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- wave | 2 | .0178788 .1285062 0.14 0.889 -.2339888 .2697463 3 | .1608712 .1285062 1.25 0.211 -.0909963 .4127387 | _cons | 4.929091 .1293572 38.10 0.000 4.675555 5.182626 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Identity | var(_cons) | .2797204 .0940178 .1447518 .5405356 -----------------------------+------------------------------------------------ var(Residual) | .2724785 .0481678 .1926902 .3853051 ------------------------------------------------------------------------------ LR test vs. linear regression: chibar2(01) = 22.82 Prob >= chibar2 = 0.0000

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -101.55 5 213.0999 220.5825 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estimates store FitSatRIE,

. lrtest FitSatUNE FitSatRIE, force

Likelihood-ratio test LR chi2(4) = 3.91 (Assumption: FitSatRIE nested in FitSatUNE) Prob > chi2 = 0.4186

. restore

. . display as result "Ch 11a: Saturated Means, Random Time Slope Model Predicting Class Emotional Support" Ch 11a: Saturated Means, Random Time Slope Model Predicting Class Emotional Support

. display as result "Using Only Level-1 Ocasions Within Level-3 Classes" Using Only Level-1 Ocasions Within Level-3 Classes

. preserve

. collapse emosup time1, by(classid wave)

. mixed emosup i.wave, /// > || classid: time1, variance reml covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -101.11637 Iteration 1: log restricted-likelihood = -100.76666 Iteration 2: log restricted-likelihood = -100.73482 Iteration 3: log restricted-likelihood = -100.73313 Iteration 4: log restricted-likelihood = -100.73311 Iteration 5: log restricted-likelihood = -100.73311

Computing standard errors:

Mixed-effects REML regression Number of obs = 99 Group variable: classid Number of groups = 33

Obs per group: min = 3 avg = 3.0 max = 3



Wald chi2(2) = 1.85 Log restricted-likelihood = -100.73311 Prob > chi2 = 0.3975

------------------------------------------------------------------------------ emosup | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- wave | 2 | .0178788 .127428 0.14 0.888 -.2318755 .267633 3 | .1608712 .1305546 1.23 0.218 -.0950111 .4167535 | _cons | 4.929091 .1409211 34.98 0.000 4.652891 5.205291 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0088727 .0138862 .0004129 .1906458 var(_cons) | .3918499 .151966 .1832355 .837973 cov(time1,_cons) | -.0589641 .0546751 -.1661253 .0481972 -----------------------------+------------------------------------------------ var(Residual) | .2634888 .046578 .1863338 .3725913 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(3) = 24.45 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -100.7331 7 215.4662 225.9418 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. restore

. . display as result "Eq 11a.6: Add Time-Varying and Class Emotional Support" Eq 11a.6: Add Time-Varying and Class Emotional Support

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close c.time1 c.size23 c.time1#c.size23 /// > c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.emosup5 c.time1#c.emosup5 c.cmemosup5 c.time1#c.cmemosup5, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2063.1058 Iteration 1: log restricted-likelihood = -2060.6572 Iteration 2: log restricted-likelihood = -2060.6305 Iteration 3: log restricted-likelihood = -2060.6305

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(11) = 84.12 Log restricted-likelihood = -2060.6305 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] --------------------+---------------------------------------------------------------- time1 | -.1302817 .031291 -4.16 0.000 -.191611 -.0689524 size23 | -.0250889 .0189421 -1.32 0.185 -.0622148 .0120369 | c.time1#c.size23 | -.0119511 .0099242 -1.20 0.228 -.0314021 .0074999 | girl | .2538791 .0684624 3.71 0.000 .1196952 .388063 | c.time1#c.girl | -.0075318 .0390962 -0.19 0.847 -.084159 .0690953 | cmgirl50 | .5107252 .4781633 1.07 0.285 -.4264578 1.447908 | c.time1#c.cmgirl50 | -1.077529 .2544781 -4.23 0.000 -1.576297 -.5787614 | emosup5 | -.0139208 .0671092 -0.21 0.836 -.1454524 .1176108 | c.time1#c.emosup5 | .0339657 .0597727 0.57 0.570 -.0831865 .151118 | cmemosup5 | .0475513 .1099144 0.43 0.665 -.1678769 .2629795 | c.time1#c.cmemosup5 | .1230319 .070459 1.75 0.081 -.0150653 .2611291 | _cons | 4.224384 .0578278 73.05 0.000 4.111044 4.337725 -------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0072993 .0046019 .0021214 .0251148 var(_cons) | .0333982 .0175767 .0119057 .0936892 cov(time1,_cons) | .0156135 .0060284 .0037982 .0274289 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0451684 .0160661 .0224941 .0906989 var(_cons) | .3823466 .0426135 .3073184 .4756921 cov(time1,_cons) | .0004881 .019942 -.0385975 .0395737 -----------------------------+------------------------------------------------ var(Residual) | .3276908 .0195501 .2915288 .3683385 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 528.17 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2060.63 19 4159.261 4187.695 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. * Multivariate Test of Level-1 Within-Class Emotional Support Effects . test (c.emosup5=0) (c.time1#c.cmemosup5=0)

( 1) [close]emosup5 = 0 ( 2) [close]c.time1#c.cmemosup5 = 0

chi2( 2) = 6.96 Prob > chi2 = 0.0309

. * Multivariate Test of Level-3 Contextual Class Emotional Support Effects . test (c.cmemosup5=0) (c.time1#c.cmemosup5=0)

( 1) [close]cmemosup5 = 0 ( 2) [close]c.time1#c.cmemosup5 = 0

chi2( 2) = 4.35 Prob > chi2 = 0.1135

. estimates store FitEmosup13C,

. . display as result "Ch 11a: New Baseline for Pseudo-R2 without Class Size Effects" Ch 11a: New Baseline for Pseudo-R2 without Class Size Effects

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2056.0785 Iteration 1: log restricted-likelihood = -2053.8582 Iteration 2: log restricted-likelihood = -2053.8468 Iteration 3: log restricted-likelihood = -2053.8468

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(5) = 51.06 Log restricted-likelihood = -2053.8468 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------------+---------------------------------------------------------------- time1 | -.127839 .0358043 -3.57 0.000 -.1980141 -.057664 girl | .2536605 .0685086 3.70 0.000 .1193861 .387935 | c.time1#c.girl | -.0065693 .039228 -0.17 0.867 -.0834548 .0703162 | cmgirl50 | .5576532 .468684 1.19 0.234 -.3609505 1.476257 | c.time1#c.cmgirl50 | -.8754114 .3047209 -2.87 0.004 -1.472653 -.2781694 | _cons | 4.218745 .0574762 73.40 0.000 4.106094 4.331397 ------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0175516 .0073618 .0077142 .0399339 var(_cons) | .0328385 .0162213 .0124713 .0864677 cov(time1,_cons) | .0240077 .0078028 .0087146 .0393008 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0474299 .0161151 .0243693 .0923129 var(_cons) | .3845794 .0424796 .3097166 .4775374 cov(time1,_cons) | -.0020548 .0199336 -.041124 .0370144 -----------------------------+------------------------------------------------ var(Residual) | .3260424 .0194185 .2901202 .3664124 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 592.32 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2053.847 13 4133.694 4153.148 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Add Just Level-3 Emotional Support Effects" Ch 11a: Add Just Level-3 Emotional Support Effects

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2053.6721 Iteration 1: log restricted-likelihood = -2051.2523 Iteration 2: log restricted-likelihood = -2051.2297 Iteration 3: log restricted-likelihood = -2051.2297

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(7) = 79.60 Log restricted-likelihood = -2051.2297 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] --------------------+---------------------------------------------------------------- time1 | -.1297869 .0312749 -4.15 0.000 -.1910847 -.0684892 girl | .2540373 .0684395 3.71 0.000 .1198983 .3881763 | c.time1#c.girl | -.007754 .039084 -0.20 0.843 -.0843572 .0688491 | cmgirl50 | .5281742 .4835052 1.09 0.275 -.4194786 1.475827 | c.time1#c.cmgirl50 | -1.057613 .2559824 -4.13 0.000 -1.559329 -.5558968 | cmemosup5 | .0731106 .0799571 0.91 0.361 -.0836024 .2298236 | c.time1#c.cmemosup5 | .1693296 .0421182 4.02 0.000 .0867794 .2518798 | _cons | 4.221169 .0581892 72.54 0.000 4.107121 4.335218 -------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0077507 .0046745 .0023767 .0252762 var(_cons) | .0356245 .0179448 .0132733 .0956131 cov(time1,_cons) | .0166167 .0062123 .0044408 .0287927 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0455401 .0160154 .0228584 .0907281 var(_cons) | .3827401 .0425221 .3078479 .4758517 cov(time1,_cons) | .000258 .0198776 -.0387014 .0392174 -----------------------------+------------------------------------------------ var(Residual) | .326727 .0194687 .290713 .3672024 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 540.22 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2051.23 15 4132.459 4154.907 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. * Multivariate Test of Level-3 Between-Class Emotional Support Effects . test (c.cmemosup5=0) (c.time1#c.cmemosup5=0)

( 1) [close]cmemosup5 = 0 ( 2) [close]c.time1#c.cmemosup5 = 0

chi2( 2) = 16.22 Prob > chi2 = 0.0003

. * Between-Class Emotional Support Effect at Wave 1 . lincom c.cmemosup5*1 + c.cmemosup5#c.time1*0

( 1) [close]cmemosup5 = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | .0731106 .0799571 0.91 0.361 -.0836024 .2298236 ------------------------------------------------------------------------------

. * Between-Class Emotional Support Effect at Wave 2 . lincom c.cmemosup5*1 + c.cmemosup5#c.time1*1

( 1) [close]cmemosup5 + [close]c.time1#c.cmemosup5 = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | .2424402 .0964814 2.51 0.012 .0533401 .4315403 ------------------------------------------------------------------------------

. * Between-Class Emotional Support Effect at Wave 3 . lincom c.cmemosup5*1 + c.cmemosup5#c.time1*2

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

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | .4117698 .1255869 3.28 0.001 .165624 .6579157 ------------------------------------------------------------------------------

. estimates store FitEmosup3C,

. . display as result "Ch 11a: Piecewise Means, Level-3 and Level-2 Random Intercepts" Ch 11a: Piecewise Means, Level-3 and Level-2 Random Intercepts

. display as result "Three-Level Model Predicting Student Victimization" Three-Level Model Predicting Student Victimization

. mixed victim c.time1 c.w3, /// > || classid: , variance reml covariance(unstructured) /// > || studentid: , covariance(unstructured), Note: single-variable random-effects specification in classid equation; covariance structure set to identity Note: single-variable random-effects specification in studentid equation; covariance structure set to identity

Performing EM optimization:

Performing gradient-based optimization:

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

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(2) = 8.87 Log restricted-likelihood = -2084.7704 Prob > chi2 = 0.0118

------------------------------------------------------------------------------ victim | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- time1 | .0422729 .0346219 1.22 0.222 -.0255848 .1101306 w3 | .0185616 .0597629 0.31 0.756 -.0985714 .1356947 _cons | 3.08197 .051475 59.87 0.000 2.981081 3.182859 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Identity | var(_cons) | .0329724 .0189898 .0106639 .1019493 -----------------------------+------------------------------------------------ studentid: Identity | var(_cons) | .6110401 .0438606 .5308481 .7033463 -----------------------------+------------------------------------------------ var(Residual) | .3419115 .014373 .3148702 .3712752 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(2) = 721.32 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2084.77 6 4181.541 4190.52 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estimates store FitPieceRI2RI3V,

. . display as result "Ch 11a: Piecewise Means, Add Level-2 Random Time Slope" Ch 11a: Piecewise Means, Add Level-2 Random Time Slope

. display as result "Three-Level Model Predicting Student Victimization" Three-Level Model Predicting Student Victimization

. mixed victim c.time1 c.w3, /// > || classid: , variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured), Note: single-variable random-effects specification in classid equation; covariance structure set to identity

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2087.7433 Iteration 1: log restricted-likelihood = -2084.0666 Iteration 2: log restricted-likelihood = -2083.9513 Iteration 3: log restricted-likelihood = -2083.9499 Iteration 4: log restricted-likelihood = -2083.9499

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(2) = 8.67 Log restricted-likelihood = -2083.9499 Prob > chi2 = 0.0131

------------------------------------------------------------------------------ victim | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- time1 | .0424451 .0343647 1.24 0.217 -.0249084 .1097987 w3 | .018483 .0588888 0.31 0.754 -.0969369 .1339029 _cons | 3.081986 .0507707 60.70 0.000 2.982477 3.181494 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Identity | var(_cons) | .0322038 .0188105 .0102498 .1011812 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0101918 .0144261 .0006359 .163343 var(_cons) | .5924908 .0547721 .4943031 .7101823 cov(time1,_cons) | .0061446 .020686 -.0343992 .0466884 -----------------------------+------------------------------------------------ var(Residual) | .3317342 .0196663 .295344 .3726082 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(4) = 722.96 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2083.95 8 4183.9 4195.872 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estimates store FitPieceRL2RI3V,

. lrtest FitPieceRL2RI3V FitPieceRI2RI3V,

Likelihood-ratio test LR chi2(2) = 1.64 (Assumption: FitPieceRI2~3V nested in FitPieceRL2~3V) Prob > chi2 = 0.4402

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 11a: Piecewise Means, Add Level-3 Random Time Slope" Ch 11a: Piecewise Means, Add Level-3 Random Time Slope

. display as result "Three-Level Model Predicting Student Victimization" Three-Level Model Predicting Student Victimization

. mixed victim c.time1 c.w3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2087.6904 Iteration 1: log restricted-likelihood = -2083.608 Iteration 2: log restricted-likelihood = -2083.4722 Iteration 3: log restricted-likelihood = -2083.4698 Iteration 4: log restricted-likelihood = -2083.4698

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(2) = 7.85 Log restricted-likelihood = -2083.4698 Prob > chi2 = 0.0198

------------------------------------------------------------------------------ victim | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- time1 | .0422764 .0348763 1.21 0.225 -.02608 .1106328 w3 | .0191358 .0588827 0.32 0.745 -.0962721 .1345438 _cons | 3.080961 .0485489 63.46 0.000 2.985807 3.176115 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0012137 .0027806 .0000136 .1082078 var(_cons) | .0248441 .0192982 .0054204 .1138709 cov(time1,_cons) | .0033508 .0053312 -.0070982 .0137998 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0090594 .0146093 .0003841 .2136765 var(_cons) | .5961095 .055447 .4967658 .7153201 cov(time1,_cons) | .0048371 .0210181 -.0363578 .0460319 -----------------------------+------------------------------------------------ var(Residual) | .3316601 .0196611 .2952794 .3725231 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 723.92 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2083.47 10 4186.94 4201.905 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estimates store FitPieceRL2RL3V,

. lrtest FitPieceRL2RL3V FitPieceRL2RI3V

Likelihood-ratio test LR chi2(2) = 0.96 (Assumption: FitPieceRL2~3V nested in FitPieceRL2~3V) Prob > chi2 = 0.6188

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 11a: Fixed Linear Time, Level-3 and Level-2 Random Intercepts" Ch 11a: Fixed Linear Time, Level-3 and Level-2 Random Intercepts

. display as result "Three-Level Model Predicting Student Victimization" Three-Level Model Predicting Student Victimization

. mixed victim c.time1, /// > || classid: , variance reml covariance(unstructured) /// > || studentid: , covariance(unstructured), Note: single-variable random-effects specification in classid equation; covariance structure set to identity Note: single-variable random-effects specification in studentid equation; covariance structure set to identity

Performing EM optimization:

Performing gradient-based optimization:

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

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(1) = 8.78 Log restricted-likelihood = -2082.92 Prob > chi2 = 0.0030

------------------------------------------------------------------------------ victim | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- time1 | .051568 .0173998 2.96 0.003 .0174651 .0856709 _cons | 3.078831 .0504721 61.00 0.000 2.979907 3.177754 ------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Identity | var(_cons) | .0329834 .0189923 .0106699 .1019601 -----------------------------+------------------------------------------------ studentid: Identity | var(_cons) | .6110737 .0438558 .5308895 .7033687 -----------------------------+------------------------------------------------ var(Residual) | .3416513 .0143557 .3146421 .370979 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(2) = 722.27 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2082.92 5 4175.84 4183.323 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Add All 3 Main Effects of Student Vicitimization Predicting Student Closeness" Ch 11a: Add All 3 Main Effects of Student Vicitimization Predicting Student Closeness

. display as result "Using Variable-Centered Level-1 and Level-2 Victim Predictors" Using Variable-Centered Level-1 and Level-2 Victim Predictors

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 /// > c.wsvictim c.wcvictim c.cmvictim3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2052.8481 Iteration 1: log restricted-likelihood = -2050.4546 Iteration 2: log restricted-likelihood = -2050.4341 Iteration 3: log restricted-likelihood = -2050.4341

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(10) = 93.41 Log restricted-likelihood = -2050.4341 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] --------------------+---------------------------------------------------------------- time1 | -.1301046 .0313087 -4.16 0.000 -.1914685 -.0687407 girl | .2583894 .0680426 3.80 0.000 .1250284 .3917504 | c.time1#c.girl | -.0073872 .0391348 -0.19 0.850 -.08409 .0693157 | cmgirl50 | .5166005 .506876 1.02 0.308 -.4768582 1.510059 | c.time1#c.cmgirl50 | -1.059243 .2554697 -4.15 0.000 -1.559955 -.558532 | cmemosup5 | .0690143 .0839987 0.82 0.411 -.09562 .2336486 | c.time1#c.cmemosup5 | .16981 .0420359 4.04 0.000 .0874213 .2521988 | wsvictim | .0079275 .0307864 0.26 0.797 -.0524127 .0682677 wcvictim | -.129019 .0356327 -3.62 0.000 -.1988579 -.0591801 cmvictim3 | -.0220062 .188815 -0.12 0.907 -.3920767 .3480644 _cons | 4.222422 .0635583 66.43 0.000 4.09785 4.346994 -------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .007636 .0046349 .0023238 .0250914 var(_cons) | .0381482 .0188386 .014492 .10042 cov(time1,_cons) | .0170675 .0063404 .0046405 .0294945 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0459618 .0160451 .0231871 .0911065 var(_cons) | .3745248 .0421597 .3003738 .4669807 cov(time1,_cons) | -.0018046 .0198763 -.0407614 .0371521 -----------------------------+------------------------------------------------ var(Residual) | .3267904 .0194778 .2907601 .3672854 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 530.78 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2050.434 18 4136.868 4163.805 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. * Level-1 Within-Student Victim Effect . lincom c.wsvictim*1

( 1) [close]wsvictim = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | .0079275 .0307864 0.26 0.797 -.0524127 .0682677 ------------------------------------------------------------------------------

. * Level-2 Within-Class Victim Effect . lincom c.wcvictim*1

( 1) [close]wcvictim = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -.129019 .0356327 -3.62 0.000 -.1988579 -.0591801 ------------------------------------------------------------------------------

. * Level-3 Between-Class Victim Effect . lincom c.cmvictim3*1

( 1) [close]cmvictim3 = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -.0220062 .188815 -0.12 0.907 -.3920767 .3480644 ------------------------------------------------------------------------------

. * Level-2 Within-Class Contextual Victim Effect . lincom c.wsvictim*-1 + c.wcvictim*1

( 1) - [close]wsvictim + [close]wcvictim = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -.1369465 .0470008 -2.91 0.004 -.2290664 -.0448267 ------------------------------------------------------------------------------

. * Level-3 Between-Class Contextual Victim Effect . lincom c.wcvictim*-1 + c.cmvictim3*1

( 1) - [close]wcvictim + [close]cmvictim3 = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | .1070128 .1921272 0.56 0.578 -.2695495 .4835752 ------------------------------------------------------------------------------

. estimates store FitVicVBC,

. . display as result "Ch 11a: Add All 3 Main Effects of Student Vicitimization Predicting Student Closeness" Ch 11a: Add All 3 Main Effects of Student Vicitimization Predicting Student Closeness

. display as result "Using Constant-Centered Level-1 and Level-2 Victim Predictors" Using Constant-Centered Level-1 and Level-2 Victim Predictors

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 /// > c.victim3 c.smvictim3 c.cmvictim3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2052.8481 Iteration 1: log restricted-likelihood = -2050.4546 Iteration 2: log restricted-likelihood = -2050.4341 Iteration 3: log restricted-likelihood = -2050.4341

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(10) = 93.41 Log restricted-likelihood = -2050.4341 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] --------------------+---------------------------------------------------------------- time1 | -.1301046 .0313087 -4.16 0.000 -.1914685 -.0687407 girl | .2583894 .0680426 3.80 0.000 .1250284 .3917504 | c.time1#c.girl | -.0073872 .0391348 -0.19 0.850 -.08409 .0693157 | cmgirl50 | .5166005 .506876 1.02 0.308 -.4768581 1.510059 | c.time1#c.cmgirl50 | -1.059243 .2554697 -4.15 0.000 -1.559955 -.5585319 | cmemosup5 | .0690143 .0839986 0.82 0.411 -.09562 .2336486 | c.time1#c.cmemosup5 | .16981 .0420359 4.04 0.000 .0874212 .2521988 | victim3 | .0079275 .0307864 0.26 0.797 -.0524127 .0682677 smvictim3 | -.1369465 .0470008 -2.91 0.004 -.2290664 -.0448267 cmvictim3 | .1070128 .1921272 0.56 0.578 -.2695495 .4835752 _cons | 4.222422 .0635583 66.43 0.000 4.09785 4.346994 -------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .007636 .0046349 .0023238 .0250914 var(_cons) | .0381482 .0188386 .014492 .10042 cov(time1,_cons) | .0170675 .0063404 .0046405 .0294945 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0459617 .0160451 .023187 .0911064 var(_cons) | .3745246 .0421596 .3003737 .4669805 cov(time1,_cons) | -.0018045 .0198763 -.0407613 .0371522 -----------------------------+------------------------------------------------ var(Residual) | .3267905 .0194778 .2907602 .3672855 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 530.78 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2050.434 18 4136.868 4163.805 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. * Level-1 Within-Student Victim Effect . lincom c.victim3*1

( 1) [close]victim3 = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | .0079275 .0307864 0.26 0.797 -.0524127 .0682677 ------------------------------------------------------------------------------

. * Level-2 Within-Class Victim Effect . lincom c.victim3*1 + c.smvictim3*1

( 1) [close]victim3 + [close]smvictim3 = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -.129019 .0356327 -3.62 0.000 -.1988579 -.0591801 ------------------------------------------------------------------------------

. * Level-3 Between-Class Victim Effect . lincom c.victim3*1 + c.smvictim3*1 + c.cmvictim3*1

( 1) [close]victim3 + [close]smvictim3 + [close]cmvictim3 = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -.0220062 .188815 -0.12 0.907 -.3920767 .3480644 ------------------------------------------------------------------------------

. * Level-2 Within-Class Contextual Victim Effect . lincom c.smvictim3*1

( 1) [close]smvictim3 = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -.1369465 .0470008 -2.91 0.004 -.2290664 -.0448267 ------------------------------------------------------------------------------

. * Level-3 Between-Class Contextual Victim Effect . lincom c.cmvictim3*1

( 1) [close]cmvictim3 = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | .1070128 .1921272 0.56 0.578 -.2695495 .4835752 ------------------------------------------------------------------------------

. . display as result "Ch 11a: Constant-Centered Student Vicitimization Predicting Student Closeness" Ch 11a: Constant-Centered Student Vicitimization Predicting Student Closeness

. display as result "For Table 11.3: Level-2 and Level-3 Effects, Omitting Level-1 Effect" For Table 11.3: Level-2 and Level-3 Effects, Omitting Level-1 Effect

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 c.smvictim3 c.cmvictim3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2050.3187 Iteration 1: log restricted-likelihood = -2047.9251 Iteration 2: log restricted-likelihood = -2047.9053 Iteration 3: log restricted-likelihood = -2047.9053

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(9) = 93.33 Log restricted-likelihood = -2047.9053 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] --------------------+---------------------------------------------------------------- time1 | -.129579 .03124 -4.15 0.000 -.1908083 -.0683498 girl | .2586456 .0680246 3.80 0.000 .12532 .3919713 | c.time1#c.girl | -.0076291 .0391048 -0.20 0.845 -.0842731 .0690149 | cmgirl50 | .5169464 .5066605 1.02 0.308 -.4760898 1.509983 | c.time1#c.cmgirl50 | -1.060045 .2554637 -4.15 0.000 -1.560745 -.5593457 | cmemosup5 | .0692349 .0839585 0.82 0.410 -.0953207 .2337905 | c.time1#c.cmemosup5 | .1695619 .0420297 4.03 0.000 .0871851 .2519386 | smvictim3 | -.1290499 .0356325 -3.62 0.000 -.1988883 -.0592116 cmvictim3 | .1066082 .1920256 0.56 0.579 -.2697551 .4829715 _cons | 4.22193 .063507 66.48 0.000 4.097458 4.346401 -------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0076523 .0046384 .0023326 .0251042 var(_cons) | .0380953 .0188232 .0144639 .1003361 cov(time1,_cons) | .0170739 .0063394 .0046489 .0294988 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0458717 .0160288 .0231266 .0909867 var(_cons) | .3745144 .042141 .300393 .4669251 cov(time1,_cons) | -.0017083 .0198583 -.0406299 .0372133 -----------------------------+------------------------------------------------ var(Residual) | .326564 .0194572 .2905711 .3670154 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 531.57 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2047.905 17 4129.811 4155.251 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Constant-Centered Student Vicitimization Predicting Student Closeness" Ch 11a: Constant-Centered Student Vicitimization Predicting Student Closeness

. display as result "For Table 11.3: Level-1 and Level-3 Effects Only, Omitting Level-2 Effect" For Table 11.3: Level-1 and Level-3 Effects Only, Omitting Level-2 Effect

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 c.victim3 c.cmvictim3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2054.9651 Iteration 1: log restricted-likelihood = -2052.5419 Iteration 2: log restricted-likelihood = -2052.5257 Iteration 3: log restricted-likelihood = -2052.5257

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(9) = 84.41 Log restricted-likelihood = -2052.5257 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] --------------------+---------------------------------------------------------------- time1 | -.1263991 .0313439 -4.03 0.000 -.1878321 -.0649661 girl | .2574117 .0681935 3.77 0.000 .1237549 .3910684 | c.time1#c.girl | -.0092235 .0391393 -0.24 0.814 -.0859351 .0674881 | cmgirl50 | .5179545 .5053074 1.03 0.305 -.4724298 1.508339 | c.time1#c.cmgirl50 | -1.064169 .2561804 -4.15 0.000 -1.566273 -.5620646 | cmemosup5 | .0711712 .0837175 0.85 0.395 -.0929121 .2352545 | c.time1#c.cmemosup5 | .1679149 .0421553 3.98 0.000 .085292 .2505378 | victim3 | -.0503951 .0233983 -2.15 0.031 -.0962549 -.0045354 cmvictim3 | .0253371 .1894673 0.13 0.894 -.346012 .3966861 _cons | 4.220308 .0634362 66.53 0.000 4.095976 4.344641 -------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0077495 .0046797 .0023728 .0253099 var(_cons) | .037465 .0187057 .014081 .0996821 cov(time1,_cons) | .0170392 .0063269 .0046386 .0294398 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0452464 .0160767 .0225496 .090788 var(_cons) | .3761329 .0423967 .3015755 .4691229 cov(time1,_cons) | -.0002616 .0198943 -.0392537 .0387305 -----------------------------+------------------------------------------------ var(Residual) | .3283885 .0195961 .2921418 .3691323 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 529.17 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2052.526 17 4139.051 4164.492 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Constant-Centered Student Vicitimization Predicting Student Closeness" Ch 11a: Constant-Centered Student Vicitimization Predicting Student Closeness

. display as result "For Table 11.3: Level-1 and Level-2 Effects, Omitting Level-3 Effect" For Table 11.3: Level-1 and Level-2 Effects, Omitting Level-3 Effect

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 c.victim3 c.smvictim3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2052.2811 Iteration 1: log restricted-likelihood = -2049.8777 numerical derivatives are approximate nearby values are missing Iteration 2: log restricted-likelihood = -2049.8553 Iteration 3: log restricted-likelihood = -2049.8553

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(9) = 92.86 Log restricted-likelihood = -2049.8553 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] --------------------+---------------------------------------------------------------- time1 | -.129922 .0313398 -4.15 0.000 -.1913468 -.0684971 girl | .2583392 .0680265 3.80 0.000 .1250097 .3916688 | c.time1#c.girl | -.0074111 .0391272 -0.19 0.850 -.084099 .0692767 | cmgirl50 | .4431799 .4856773 0.91 0.362 -.5087301 1.39509 | c.time1#c.cmgirl50 | -1.05913 .2558887 -4.14 0.000 -1.560662 -.5575971 | cmemosup5 | .0573079 .0803842 0.71 0.476 -.1002422 .214858 | c.time1#c.cmemosup5 | .169965 .042107 4.04 0.000 .0874368 .2524931 | victim3 | .0077547 .0307831 0.25 0.801 -.0525792 .0680885 smvictim3 | -.1330343 .0464902 -2.86 0.004 -.2241535 -.0419151 _cons | 4.235734 .0583803 72.55 0.000 4.121311 4.350158 -------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0077109 .0046578 .0023601 .0251931 var(_cons) | .0366837 .0181838 .0138848 .0969186 cov(time1,_cons) | .0168186 .0062442 .0045801 .0290571 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0458791 .0160411 .0231208 .0910389 var(_cons) | .3742228 .0421218 .3001378 .4665947 cov(time1,_cons) | -.0016085 .0198652 -.0405435 .0373266 -----------------------------+------------------------------------------------ var(Residual) | .3267888 .0194773 .2907593 .3672828 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 530.01 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2049.855 17 4133.711 4159.151 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Constant-Centered Student Vicitimization Predicting Student Closeness" Ch 11a: Constant-Centered Student Vicitimization Predicting Student Closeness

. display as result "For Table 11.3: Level-1 Effect Only, Omitting Level-2 and Level-3 Effects" For Table 11.3: Level-1 Effect Only, Omitting Level-2 and Level-3 Effects

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 c.victim3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2054.2412 Iteration 1: log restricted-likelihood = -2051.8024 Iteration 2: log restricted-likelihood = -2051.7842 Iteration 3: log restricted-likelihood = -2051.7842

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(8) = 84.02 Log restricted-likelihood = -2051.7842 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] --------------------+---------------------------------------------------------------- time1 | -.1263365 .0314003 -4.02 0.000 -.1878799 -.0647931 girl | .2574027 .0681698 3.78 0.000 .1237924 .391013 | c.time1#c.girl | -.0092107 .0391283 -0.24 0.814 -.0859009 .0674794 | cmgirl50 | .4983001 .4823513 1.03 0.302 -.447091 1.443691 | c.time1#c.cmgirl50 | -1.063538 .2569035 -4.14 0.000 -1.56706 -.5600166 | cmemosup5 | .0686806 .0797698 0.86 0.389 -.0876653 .2250266 | c.time1#c.cmemosup5 | .1678716 .0422785 3.97 0.000 .0850073 .2507358 | victim3 | -.0500446 .0232327 -2.15 0.031 -.0955799 -.0045094 _cons | 4.223377 .0580116 72.80 0.000 4.109676 4.337077 -------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0078782 .004721 .0024342 .0254982 var(_cons) | .0355542 .0178927 .0132593 .0953365 cov(time1,_cons) | .0167363 .0062148 .0045555 .0289172 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0451379 .0160704 .022464 .0906972 var(_cons) | .3757001 .0423442 .3012344 .4685739 cov(time1,_cons) | -8.61e-06 .0198784 -.0389696 .0389524 -----------------------------+------------------------------------------------ var(Residual) | .3283671 .0195937 .2921248 .3691059 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 528.15 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2051.784 16 4135.568 4159.512 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Add All 3 Victim*Time Interactions Predicting Student Closeness" Ch 11a: Add All 3 Victim*Time Interactions Predicting Student Closeness

. display as result "Using Variable-Centered Level-1 and Level-2 Victim Predictors" Using Variable-Centered Level-1 and Level-2 Victim Predictors

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 /// > c.wsvictim c.wcvictim c.cmvictim3 /// > c.time1#c.wsvictim c.time1#c.wcvictim c.time1#c.cmvictim3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2058.8641 Iteration 1: log restricted-likelihood = -2056.5009 Iteration 2: log restricted-likelihood = -2056.4825 Iteration 3: log restricted-likelihood = -2056.4825

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(13) = 92.28 Log restricted-likelihood = -2056.4825 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] --------------------+---------------------------------------------------------------- time1 | -.1287092 .0341806 -3.77 0.000 -.1957019 -.0617165 girl | .2580919 .0681169 3.79 0.000 .1245852 .3915986 | c.time1#c.girl | -.0068985 .039212 -0.18 0.860 -.0837526 .0699556 | cmgirl50 | .5114395 .5069094 1.01 0.313 -.4820846 1.504964 | c.time1#c.cmgirl50 | -1.063133 .2680651 -3.97 0.000 -1.588531 -.537735 | cmemosup5 | .0692106 .0839453 0.82 0.410 -.0953192 .2337404 | c.time1#c.cmemosup5 | .1676201 .04429 3.78 0.000 .0808132 .254427 | wsvictim | .0060898 .056049 0.11 0.913 -.1037642 .1159438 wcvictim | -.1151332 .040263 -2.86 0.004 -.1940473 -.0362192 cmvictim3 | -.0260516 .1912685 -0.14 0.892 -.4009309 .3488278 | c.time1#c.wsvictim | .0026192 .0482865 0.05 0.957 -.0920206 .0972591 | c.time1#c.wcvictim | -.0175171 .023431 -0.75 0.455 -.0634411 .0284069 | c.time1#c.cmvictim3 | -.0118739 .100098 -0.12 0.906 -.2080624 .1843146 | _cons | 4.223181 .0637068 66.29 0.000 4.098318 4.348044 -------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0082174 .0049299 .0025355 .0266314 var(_cons) | .0379002 .0188658 .0142868 .1005424 cov(time1,_cons) | .0176477 .0065713 .0047681 .0305272 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0465818 .0160999 .0236602 .0917093 var(_cons) | .3752384 .0422115 .300991 .4678008 cov(time1,_cons) | -.0023473 .019928 -.0414054 .0367109 -----------------------------+------------------------------------------------ var(Residual) | .3267602 .0194838 .2907196 .3672688 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 529.99 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2056.482 21 4154.965 4186.392 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Add All 3 Victim*Time Interactions Predicting Student Closeness" Ch 11a: Add All 3 Victim*Time Interactions Predicting Student Closeness

. display as result "Using Constant-Centered Level-1 and Level-2 Victim Predictors" Using Constant-Centered Level-1 and Level-2 Victim Predictors

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 /// > c.victim3 c.smvictim3 c.cmvictim3 /// > c.time1#c.victim3 c.time1#c.smvictim3 c.time1#c.cmvictim3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2058.8641 Iteration 1: log restricted-likelihood = -2056.501 Iteration 2: log restricted-likelihood = -2056.4825 Iteration 3: log restricted-likelihood = -2056.4825

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(13) = 92.28 Log restricted-likelihood = -2056.4825 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] --------------------+---------------------------------------------------------------- time1 | -.1287092 .0341806 -3.77 0.000 -.1957019 -.0617165 girl | .2580919 .0681169 3.79 0.000 .1245851 .3915986 | c.time1#c.girl | -.0068985 .039212 -0.18 0.860 -.0837526 .0699556 | cmgirl50 | .5114397 .5069099 1.01 0.313 -.4820855 1.504965 | c.time1#c.cmgirl50 | -1.063133 .2680648 -3.97 0.000 -1.58853 -.5377356 | cmemosup5 | .0692106 .0839454 0.82 0.410 -.0953193 .2337406 | c.time1#c.cmemosup5 | .1676201 .04429 3.78 0.000 .0808133 .2544269 | victim3 | .0060898 .056049 0.11 0.913 -.1037642 .1159437 smvictim3 | -.121223 .0673544 -1.80 0.072 -.2532352 .0107893 cmvictim3 | .0890817 .1954067 0.46 0.648 -.2939085 .4720718 | c.time1#c.victim3 | .0026193 .0482865 0.05 0.957 -.0920205 .0972591 | c.time1#c.smvictim3 | -.0201364 .0524994 -0.38 0.701 -.1230333 .0827605 | c.time1#c.cmvictim3 | .0056432 .1027645 0.05 0.956 -.1957716 .207058 | _cons | 4.223181 .0637068 66.29 0.000 4.098318 4.348044 -------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0082173 .0049298 .0025355 .0266314 var(_cons) | .0379004 .0188659 .0142869 .1005427 cov(time1,_cons) | .0176476 .0065713 .0047681 .0305272 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0465826 .0160998 .023661 .0917095 var(_cons) | .3752395 .0422115 .3009921 .4678018 cov(time1,_cons) | -.002348 .019928 -.0414061 .0367101 -----------------------------+------------------------------------------------ var(Residual) | .3267594 .0194837 .2907191 .3672678 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(6) = 529.99 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2056.482 21 4154.965 4186.392 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Add Random Within-Student Vicitimization Effect across Students" Ch 11a: Add Random Within-Student Vicitimization Effect across Students

. display as result "Using Variable-Centered Level-1 and Level-2 Victim Predictors" Using Variable-Centered Level-1 and Level-2 Victim Predictors

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 /// > c.wsvictim c.wcvictim c.cmvictim3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1 wsvictim, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2051.5809 Iteration 1: log restricted-likelihood = -2042.5861 Iteration 2: log restricted-likelihood = -2040.9098 Iteration 3: log restricted-likelihood = -2040.8497 Iteration 4: log restricted-likelihood = -2040.8497

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(10) = 94.73 Log restricted-likelihood = -2040.8497 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] --------------------+---------------------------------------------------------------- time1 | -.1296164 .0310332 -4.18 0.000 -.1904404 -.0687924 girl | .2533906 .0679507 3.73 0.000 .1202097 .3865714 | c.time1#c.girl | -.0014554 .0384822 -0.04 0.970 -.0768791 .0739683 | cmgirl50 | .5516338 .5072986 1.09 0.277 -.4426532 1.545921 | c.time1#c.cmgirl50 | -1.098173 .2539069 -4.33 0.000 -1.595821 -.6005247 | cmemosup5 | .07137 .0838715 0.85 0.395 -.0930151 .2357551 | c.time1#c.cmemosup5 | .1661584 .0415765 4.00 0.000 .0846698 .2476469 | wsvictim | -.0188706 .0360779 -0.52 0.601 -.089582 .0518408 wcvictim | -.1298565 .0356596 -3.64 0.000 -.1997481 -.0599649 cmvictim3 | -.0282481 .1884579 -0.15 0.881 -.3976187 .3411225 _cons | 4.222067 .0635072 66.48 0.000 4.097596 4.346539 -------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0077263 .0046642 .0023666 .0252244 var(_cons) | .0382392 .0189472 .0144792 .1009887 cov(time1,_cons) | .0171886 .0063623 .0047187 .0296586 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .042253 .0158162 .0202878 .0879994 var(wsvictim) | .1023735 .0321207 .0553496 .189348 var(_cons) | .3882283 .0421264 .3138513 .4802313 cov(time1,wsvictim) | -.0122645 .0135125 -.0387484 .0142195 cov(time1,_cons) | -.0012807 .0195971 -.0396902 .0371289 cov(wsvictim,_cons) | .020438 .027283 -.0330357 .0739116 -----------------------------+------------------------------------------------ var(Residual) | .2956783 .0196977 .2594856 .3369189 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(9) = 549.94 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2040.85 21 4123.699 4155.126 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. estimates store FitVicRWS2C,

. lrtest FitVicRWS2C FitVicVBC,

Likelihood-ratio test LR chi2(3) = 19.17 (Assumption: FitVicVBC nested in FitVicRWS2C) Prob > chi2 = 0.0003

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 11a: Add Quadratic Level-3 Effects of Gender" Ch 11a: Add Quadratic Level-3 Effects of Gender

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 c.wsvictim c.wcvictim c.cmvictim3 /// > c.cmgirl50#c.cmgirl50 c.time1#c.cmgirl50#c.cmgirl50, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1 wsvictim, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2047.532 Iteration 1: log restricted-likelihood = -2038.5803 Iteration 2: log restricted-likelihood = -2036.9171 Iteration 3: log restricted-likelihood = -2036.8651 Iteration 4: log restricted-likelihood = -2036.8651

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(12) = 96.06 Log restricted-likelihood = -2036.8651 Prob > chi2 = 0.0000

----------------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] ------------------------------+---------------------------------------------------------------- time1 | -.1164886 .0351574 -3.31 0.001 -.1853959 -.0475813 girl | .2532557 .0679941 3.72 0.000 .1199898 .3865216 | c.time1#c.girl | -.0013372 .0385145 -0.03 0.972 -.0768242 .0741499 | cmgirl50 | .6552339 .5419992 1.21 0.227 -.407065 1.717533 | c.time1#c.cmgirl50 | -1.037007 .2645101 -3.92 0.000 -1.555438 -.518577 | cmemosup5 | .0665327 .0846665 0.79 0.432 -.0994106 .232476 | c.time1#c.cmemosup5 | .1624813 .041635 3.90 0.000 .0808783 .2440843 | wsvictim | -.0190434 .0361098 -0.53 0.598 -.0898172 .0517305 wcvictim | -.1299024 .035669 -3.64 0.000 -.1998123 -.0599924 cmvictim3 | -.0148853 .1929152 -0.08 0.938 -.3929923 .3632216 | c.cmgirl50#c.cmgirl50 | -1.912933 3.414024 -0.56 0.575 -8.604297 4.77843 | c.time1#c.cmgirl50#c.cmgirl50 | -1.336914 1.713574 -0.78 0.435 -4.695457 2.021629 | _cons | 4.24013 .07036 60.26 0.000 4.102227 4.378033 -----------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0075178 .0047422 .0021835 .0258839 var(_cons) | .0391767 .019725 .0146035 .1050988 cov(time1,_cons) | .0171617 .0065446 .0043346 .0299888 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0425746 .0158357 .0205373 .0882586 var(wsvictim) | .1026564 .0321515 .055564 .1896612 var(_cons) | .3891345 .0422072 .3146117 .4813098 cov(time1,wsvictim) | -.0120326 .0135317 -.0385542 .014489 cov(time1,_cons) | -.001773 .0196307 -.0402484 .0367024 cov(wsvictim,_cons) | .0208272 .0273247 -.0327283 .0743828 -----------------------------+------------------------------------------------ var(Residual) | .2955769 .0196938 .2593918 .3368098 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(9) = 543.32 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2036.865 23 4119.73 4154.15 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Add Quadratic Level-3 Effects of Emotional Support" Ch 11a: Add Quadratic Level-3 Effects of Emotional Support

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 c.wsvictim c.wcvictim c.cmvictim3 /// > c.cmemosup5#c.cmemosup5 c.time1#c.cmemosup5#c.cmemosup5, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1 wsvictim, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2054.2788 Iteration 1: log restricted-likelihood = -2045.3334 Iteration 2: log restricted-likelihood = -2043.6622 Iteration 3: log restricted-likelihood = -2043.6012 Iteration 4: log restricted-likelihood = -2043.6012

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(12) = 94.38 Log restricted-likelihood = -2043.6012 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] --------------------------------+---------------------------------------------------------------- time1 | -.1214938 .0384163 -3.16 0.002 -.1967885 -.0461992 girl | .2534232 .0679884 3.73 0.000 .1201683 .386678 | c.time1#c.girl | -.0014579 .0385108 -0.04 0.970 -.0769376 .0740218 | cmgirl50 | .5319671 .5112928 1.04 0.298 -.4701484 1.534083 | c.time1#c.cmgirl50 | -1.093819 .2559747 -4.27 0.000 -1.59552 -.5921178 | cmemosup5 | .0317252 .1045477 0.30 0.762 -.1731846 .2366349 | c.time1#c.cmemosup5 | .1573838 .0486018 3.24 0.001 .0621261 .2526416 | wsvictim | -.0189006 .0360974 -0.52 0.601 -.0896503 .0518491 wcvictim | -.1299165 .0356647 -3.64 0.000 -.1998179 -.060015 cmvictim3 | -.0760006 .2054322 -0.37 0.711 -.4786403 .326639 | c.cmemosup5#c.cmemosup5 | -.0857982 .1323188 -0.65 0.517 -.3451382 .1735419 | c.time1#c.cmemosup5#c.cmemosup5 | -.02226 .0622371 -0.36 0.721 -.1442425 .0997225 | _cons | 4.258839 .0857946 49.64 0.000 4.090684 4.426993 -------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0080159 .0048562 .002445 .0262799 var(_cons) | .0391007 .0195422 .0146812 .1041377 cov(time1,_cons) | .0177039 .006603 .0047622 .0306457 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0425318 .01584 .0204976 .088252 var(wsvictim) | .102452 .0321505 .0553866 .1895116 var(_cons) | .388984 .0421969 .3144804 .4811382 cov(time1,wsvictim) | -.0122892 .0135314 -.0388102 .0142318 cov(time1,_cons) | -.0017656 .0196329 -.0402453 .0367142 cov(wsvictim,_cons) | .0207316 .0273195 -.0328135 .0742768 -----------------------------+------------------------------------------------ var(Residual) | .2956526 .0196974 .2594608 .3368928 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(9) = 549.77 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2043.601 23 4133.202 4167.622 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Add Quadratic Effect of Victimization at Each Level" Ch 11a: Add Quadratic Effect of Victimization at Each Level

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 c.wsvictim c.wcvictim c.cmvictim3 /// > c.cmvictim3#c.cmvictim3 c.wcvictim#c.wcvictim c.wsvictim#c.wsvictim, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1 wsvictim, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2053.8738 Iteration 1: log restricted-likelihood = -2044.4484 Iteration 2: log restricted-likelihood = -2042.8208 Iteration 3: log restricted-likelihood = -2042.7049 Iteration 4: log restricted-likelihood = -2042.7049

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(13) = 99.52 Log restricted-likelihood = -2042.7049 Prob > chi2 = 0.0000

----------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] ------------------------+---------------------------------------------------------------- time1 | -.1303926 .0310509 -4.20 0.000 -.1912512 -.0695339 girl | .2502795 .0680469 3.68 0.000 .1169101 .3836489 | c.time1#c.girl | -.0006693 .0383986 -0.02 0.986 -.0759293 .0745906 | cmgirl50 | .5466125 .4953383 1.10 0.270 -.4242327 1.517458 | c.time1#c.cmgirl50 | -1.087185 .2543803 -4.27 0.000 -1.585761 -.5886091 | cmemosup5 | .0799242 .0820081 0.97 0.330 -.0808088 .2406571 | c.time1#c.cmemosup5 | .1649671 .0416737 3.96 0.000 .0832881 .2466461 | wsvictim | -.01758 .0358575 -0.49 0.624 -.0878594 .0526994 wcvictim | -.1291834 .0423923 -3.05 0.002 -.2122708 -.046096 cmvictim3 | -.163828 .2141192 -0.77 0.444 -.583494 .255838 | c.cmvictim3#c.cmvictim3 | .6364513 .4822989 1.32 0.187 -.3088373 1.58174 | c.wcvictim#c.wcvictim | .0145842 .0339441 0.43 0.667 -.051945 .0811135 | c.wsvictim#c.wsvictim | -.0879498 .0497443 -1.77 0.077 -.1854468 .0095472 | _cons | 4.19356 .0737348 56.87 0.000 4.049043 4.338078 -----------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0078627 .0047725 .0023928 .0258364 var(_cons) | .0342085 .0181022 .0121256 .0965088 cov(time1,_cons) | .0164003 .0061945 .0042593 .0285413 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0404574 .0158408 .0187809 .0871525 var(wsvictim) | .0968435 .0319809 .0506962 .1849973 var(_cons) | .3879733 .0423002 .3133261 .4804046 cov(time1,wsvictim) | -.0120737 .0134483 -.0384319 .0142846 cov(time1,_cons) | -.0011533 .0196462 -.039659 .0373525 cov(wsvictim,_cons) | .0217366 .0272731 -.0317177 .0751908 -----------------------------+------------------------------------------------ var(Residual) | .2984193 .0199721 .2617333 .3402474 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(9) = 533.58 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2042.705 24 4133.41 4169.326 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Add Two-Way and Three-Way Interactions Among Level-3 Effects" Ch 11a: Add Two-Way and Three-Way Interactions Among Level-3 Effects

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 c.wsvictim c.wcvictim c.cmvictim3 /// > c.cmgirl50#c.cmemosup5 c.cmgirl50#c.cmvictim3 c.cmemosup5#c.cmvictim3 /// > c.time1#c.cmgirl50#c.cmemosup5 c.time1#c.cmgirl50#c.cmvictim3 c.time1#c.cmemosup5#c.cmvictim3 /// > c.cmgirl50#c.cmemosup5#c.cmvictim3 c.time1#c.cmgirl50#c.cmemosup5#c.cmvictim3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1 wsvictim, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2039.8022 Iteration 1: log restricted-likelihood = -2030.7489 Iteration 2: log restricted-likelihood = -2028.976 Iteration 3: log restricted-likelihood = -2028.9025 Iteration 4: log restricted-likelihood = -2028.9024

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(18) = 101.87 Log restricted-likelihood = -2028.9024 Prob > chi2 = 0.0000

------------------------------------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------------------------------------+---------------------------------------------------------------- time1 | -.1302452 .0339362 -3.84 0.000 -.1967589 -.0637315 girl | .2543978 .0678402 3.75 0.000 .1214334 .3873622 | c.time1#c.girl | -.0018776 .03849 -0.05 0.961 -.0773166 .0735613 | cmgirl50 | .6126482 .6248193 0.98 0.327 -.6119751 1.837272 | c.time1#c.cmgirl50 | -.9821833 .3370043 -2.91 0.004 -1.6427 -.321667 | cmemosup5 | .1831008 .1198032 1.53 0.126 -.0517091 .4179107 | c.time1#c.cmemosup5 | .1735497 .0644118 2.69 0.007 .0473049 .2997944 | wsvictim | -.0192788 .0361073 -0.53 0.593 -.0900479 .0514902 wcvictim | -.1307481 .0356106 -3.67 0.000 -.2005437 -.0609525 cmvictim3 | -.0295583 .1844882 -0.16 0.873 -.3911485 .3320319 | c.cmgirl50#c.cmemosup5 | -2.884524 1.053481 -2.74 0.006 -4.949309 -.8197391 | c.cmgirl50#c.cmvictim3 | -.0879709 2.227891 -0.04 0.969 -4.454558 4.278616 | c.cmemosup5#c.cmvictim3 | -.6834295 .322916 -2.12 0.034 -1.316333 -.0505257 | c.time1#c.cmgirl50#c.cmemosup5 | -.5080981 .6003371 -0.85 0.397 -1.684737 .668541 | c.time1#c.cmgirl50#c.cmvictim3 | -.9119232 1.243302 -0.73 0.463 -3.34875 1.524904 | c.time1#c.cmemosup5#c.cmvictim3 | .0747057 .1802599 0.41 0.679 -.2785972 .4280086 | c.cmgirl50#c.cmemosup5#c.cmvictim3 | 4.087385 4.554159 0.90 0.369 -4.838603 13.01337 | c.time1#c.cmgirl50#c.cmemosup5#c.cmvictim3 | .5748809 2.540795 0.23 0.821 -4.404986 5.554748 | _cons | 4.203483 .0659892 63.70 0.000 4.074147 4.332819 ------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0090953 .0052867 .0029111 .0284173 var(_cons) | .0303456 .0170369 .0100973 .0911979 cov(time1,_cons) | .0166133 .0063609 .0041461 .0290805 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0425248 .0158641 .020469 .0883462 var(wsvictim) | .101486 .0321022 .054595 .1886513 var(_cons) | .386959 .0421232 .3126121 .4789875 cov(time1,wsvictim) | -.0138849 .0136896 -.0407161 .0129462 cov(time1,_cons) | -.0014185 .0196474 -.0399266 .0370897 cov(wsvictim,_cons) | .0265355 .0275137 -.0273904 .0804614 -----------------------------+------------------------------------------------ var(Residual) | .2959304 .0197316 .2596777 .3372443 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(9) = 534.92 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2028.902 29 4115.805 4159.204 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Keep Gender*Emotional Support and Emotional Support*Victimization Level-3 Interactions" Ch 11a: Keep Gender*Emotional Support and Emotional Support*Victimization Level-3 Interactions

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 c.wsvictim c.wcvictim c.cmvictim3 /// > c.cmgirl50#c.cmemosup5 c.cmemosup5#c.cmvictim3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1 wsvictim, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2047.712 Iteration 1: log restricted-likelihood = -2038.6678 Iteration 2: log restricted-likelihood = -2036.8774 Iteration 3: log restricted-likelihood = -2036.8053 Iteration 4: log restricted-likelihood = -2036.8053

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(12) = 102.17 Log restricted-likelihood = -2036.8053 Prob > chi2 = 0.0000

----------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] ------------------------+---------------------------------------------------------------- time1 | -.130316 .0310691 -4.19 0.000 -.1912103 -.0694216 girl | .2533139 .0677818 3.74 0.000 .120464 .3861637 | c.time1#c.girl | -.0013913 .0384455 -0.04 0.971 -.076743 .0739604 | cmgirl50 | .5288728 .4797146 1.10 0.270 -.4113506 1.469096 | c.time1#c.cmgirl50 | -1.117203 .2545311 -4.39 0.000 -1.616075 -.6183311 | cmemosup5 | .1032371 .0805653 1.28 0.200 -.0546679 .2611422 | c.time1#c.cmemosup5 | .1687111 .0416695 4.05 0.000 .0870404 .2503817 | wsvictim | -.0211127 .0360875 -0.59 0.559 -.0918428 .0496174 wcvictim | -.1300104 .0355947 -3.65 0.000 -.1997746 -.0602461 cmvictim3 | -.0557046 .1793143 -0.31 0.756 -.4071542 .2957449 | c.cmgirl50#c.cmemosup5 | -2.377951 .899481 -2.64 0.008 -4.140901 -.6150003 | c.cmemosup5#c.cmvictim3 | -.701378 .3158543 -2.22 0.026 -1.320441 -.082315 | _cons | 4.213887 .0615569 68.46 0.000 4.093238 4.334536 -----------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0078168 .0046362 .0024444 .0249965 var(_cons) | .0293864 .0161467 .0100102 .0862677 cov(time1,_cons) | .0151561 .005747 .0038922 .02642 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .041866 .0158296 .0199536 .0878419 var(wsvictim) | .1025892 .032181 .0554741 .1897203 var(_cons) | .3852645 .0419867 .3111672 .4770064 cov(time1,wsvictim) | -.0136992 .0135342 -.0402258 .0128274 cov(time1,_cons) | -.0004728 .0195869 -.0388625 .0379169 cov(wsvictim,_cons) | .0240811 .0273678 -.0295589 .0777211 -----------------------------+------------------------------------------------ var(Residual) | .2960603 .0197276 .2598134 .337364 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(9) = 533.79 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2036.805 23 4119.611 4154.03 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Add Time by Level-2 Interactions (and Contextual Level-3 Interactions)" Ch 11a: Add Time by Level-2 Interactions (and Contextual Level-3 Interactions)

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 c.wsvictim c.wcvictim c.cmvictim3 /// > c.cmgirl50#c.cmemosup5 c.cmemosup5#c.cmvictim3 /// > c.girl#c.wcvictim c.cmgirl50#c.wcvictim /// > c.time1#c.wcvictim c.time1#c.girl#c.wcvictim c.time1#c.cmvictim3 c.time1#c.cmgirl50#c.wcvictim, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1 wsvictim, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2051.4694 Iteration 1: log restricted-likelihood = -2042.5382 Iteration 2: log restricted-likelihood = -2040.7773 Iteration 3: log restricted-likelihood = -2040.725 Iteration 4: log restricted-likelihood = -2040.725

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(18) = 111.39 Log restricted-likelihood = -2040.725 Prob > chi2 = 0.0000

----------------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] ------------------------------+---------------------------------------------------------------- time1 | -.128174 .03361 -3.81 0.000 -.1940483 -.0622997 girl | .2543871 .06787 3.75 0.000 .1213644 .3874097 | c.time1#c.girl | -.001853 .0384447 -0.05 0.962 -.0772033 .0734973 | cmgirl50 | .536331 .4764604 1.13 0.260 -.3975143 1.470176 | c.time1#c.cmgirl50 | -1.120172 .2646615 -4.23 0.000 -1.638899 -.6014453 | cmemosup5 | .1041371 .0799485 1.30 0.193 -.0525589 .2608332 | c.time1#c.cmemosup5 | .1661926 .0433905 3.83 0.000 .0811488 .2512364 | wsvictim | -.0212709 .0362513 -0.59 0.557 -.0923221 .0497803 wcvictim | -.0731919 .0579368 -1.26 0.206 -.1867459 .0403621 cmvictim3 | -.0595609 .1795753 -0.33 0.740 -.4115221 .2924003 | c.cmgirl50#c.cmemosup5 | -2.369579 .8930898 -2.65 0.008 -4.120003 -.6191555 | c.cmemosup5#c.cmvictim3 | -.7032822 .3135495 -2.24 0.025 -1.317828 -.0887364 | c.girl#c.wcvictim | -.0829576 .0818023 -1.01 0.311 -.2432872 .077372 | c.cmgirl50#c.wcvictim | -.0055508 .4175137 -0.01 0.989 -.8238625 .812761 | c.time1#c.wcvictim | .0232113 .0328459 0.71 0.480 -.0411655 .0875881 | c.time1#c.girl#c.wcvictim | -.0881709 .0466281 -1.89 0.059 -.1795604 .0032186 | c.time1#c.cmvictim3 | -.012088 .0985057 -0.12 0.902 -.2051555 .1809796 | c.time1#c.cmgirl50#c.wcvictim | -.1229897 .243035 -0.51 0.613 -.5993295 .3533501 | _cons | 4.214474 .0613597 68.68 0.000 4.094211 4.334736 -----------------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0080309 .0047906 .0024946 .0258538 var(_cons) | .0282307 .0158603 .0093865 .0849055 cov(time1,_cons) | .0150571 .0057784 .0037317 .0263826 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0415377 .015796 .0197127 .0875264 var(wsvictim) | .1059107 .0328011 .057719 .1943397 var(_cons) | .3872315 .0421266 .3128738 .479261 cov(time1,wsvictim) | -.0124974 .0136488 -.0392485 .0142537 cov(time1,_cons) | -.0020813 .0196199 -.0405356 .0363729 cov(wsvictim,_cons) | .0254296 .0275972 -.0286599 .079519 -----------------------------+------------------------------------------------ var(Residual) | .2947925 .0196985 .2586055 .3360432 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(9) = 529.89 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2040.725 29 4139.45 4182.849 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Add Level-3 by Within-Class Victim Cross-Level Interactions" Ch 11a: Add Level-3 by Within-Class Victim Cross-Level Interactions

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 c.wsvictim c.wcvictim c.cmvictim3 /// > c.cmgirl50#c.cmemosup5 c.cmemosup5#c.cmvictim3 /// > c.girl#c.wcvictim c.cmgirl50#c.wcvictim /// > c.wcvictim#c.cmemosup5 c.wcvictim#c.cmvictim3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1 wsvictim, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2049.1673 Iteration 1: log restricted-likelihood = -2040.1279 Iteration 2: log restricted-likelihood = -2038.3626 Iteration 3: log restricted-likelihood = -2038.2964 Iteration 4: log restricted-likelihood = -2038.2964

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(16) = 108.81 Log restricted-likelihood = -2038.2964 Prob > chi2 = 0.0000

----------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] ------------------------+---------------------------------------------------------------- time1 | -.1306961 .0310105 -4.21 0.000 -.1914755 -.0699167 girl | .253369 .067885 3.73 0.000 .1203169 .3864212 | c.time1#c.girl | -.0007373 .0384296 -0.02 0.985 -.0760579 .0745833 | cmgirl50 | .5382095 .4760259 1.13 0.258 -.3947841 1.471203 | c.time1#c.cmgirl50 | -1.119459 .2539088 -4.41 0.000 -1.617111 -.6218069 | cmemosup5 | .1037305 .0799088 1.30 0.194 -.0528878 .2603488 | c.time1#c.cmemosup5 | .1690197 .0415583 4.07 0.000 .087567 .2504723 | wsvictim | -.0210406 .0361193 -0.58 0.560 -.0918331 .0497519 wcvictim | -.0653945 .0568909 -1.15 0.250 -.1768986 .0461096 cmvictim3 | -.0621209 .1781529 -0.35 0.727 -.4112943 .2870525 | c.cmgirl50#c.cmemosup5 | -2.359117 .8935545 -2.64 0.008 -4.110452 -.6077827 | c.cmemosup5#c.cmvictim3 | -.7106677 .3138077 -2.26 0.024 -1.325719 -.095616 | c.girl#c.wcvictim | -.1623745 .0737383 -2.20 0.028 -.306899 -.01785 | c.cmgirl50#c.wcvictim | .0538915 .3940856 0.14 0.891 -.7185021 .826285 | c.wcvictim#c.cmemosup5 | -.0565545 .062887 -0.90 0.368 -.1798107 .0667018 | c.wcvictim#c.cmvictim3 | .0919522 .1587644 0.58 0.562 -.2192202 .4031247 | _cons | 4.214988 .0612392 68.83 0.000 4.094961 4.335015 -----------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0077179 .0045991 .0024003 .0248158 var(_cons) | .0281816 .0157404 .0094306 .0842152 cov(time1,_cons) | .0147479 .0056208 .0037314 .0257644 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0415996 .0158149 .0197464 .0876376 var(wsvictim) | .1031617 .0322856 .0558632 .1905073 var(_cons) | .3864149 .0421774 .311993 .4785892 cov(time1,wsvictim) | -.0135998 .0135383 -.0401344 .0129348 cov(time1,_cons) | -.0019177 .0196465 -.0404241 .0365888 cov(wsvictim,_cons) | .0231765 .0275478 -.0308162 .0771693 -----------------------------+------------------------------------------------ var(Residual) | .2960532 .0197333 .2597965 .3373699 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(9) = 528.97 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2038.296 27 4130.593 4170.999 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Ch 11a: Add Level-3 by Within-Student Victim Cross-Level Interactions" Ch 11a: Add Level-3 by Within-Student Victim Cross-Level Interactions

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 c.wsvictim c.wcvictim c.cmvictim3 /// > c.cmgirl50#c.cmemosup5 c.cmemosup5#c.cmvictim3 /// > c.girl#c.wcvictim c.cmgirl50#c.wcvictim /// > c.wsvictim#c.cmgirl50 c.wsvictim#c.cmemosup5 c.wsvictim#c.cmvictim3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1 wsvictim, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2049.2463 Iteration 1: log restricted-likelihood = -2040.2402 Iteration 2: log restricted-likelihood = -2038.4551 Iteration 3: log restricted-likelihood = -2038.3844 Iteration 4: log restricted-likelihood = -2038.3844

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(17) = 109.20 Log restricted-likelihood = -2038.3844 Prob > chi2 = 0.0000

----------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] ------------------------+---------------------------------------------------------------- time1 | -.1310499 .0309771 -4.23 0.000 -.1917639 -.0703359 girl | .2517251 .0679695 3.70 0.000 .1185072 .3849429 | c.time1#c.girl | .0000809 .0384503 0.00 0.998 -.0752803 .0754421 | cmgirl50 | .558451 .4783019 1.17 0.243 -.3790036 1.495906 | c.time1#c.cmgirl50 | -1.127747 .2539752 -4.44 0.000 -1.625529 -.6299643 | cmemosup5 | .1094546 .0803543 1.36 0.173 -.0480368 .2669461 | c.time1#c.cmemosup5 | .1661614 .0416554 3.99 0.000 .0845182 .2478046 | wsvictim | -.0495935 .043317 -1.14 0.252 -.1344934 .0353063 wcvictim | -.0550627 .0516928 -1.07 0.287 -.1563787 .0462534 cmvictim3 | -.0436193 .1793211 -0.24 0.808 -.3950822 .3078436 | c.cmgirl50#c.cmemosup5 | -2.388023 .8966828 -2.66 0.008 -4.145489 -.6305573 | c.cmemosup5#c.cmvictim3 | -.7199962 .3151301 -2.28 0.022 -1.33764 -.1023526 | c.girl#c.wcvictim | -.1519679 .0732359 -2.08 0.038 -.2955076 -.0084282 | c.cmgirl50#c.wcvictim | -.0955705 .370263 -0.26 0.796 -.8212727 .6301316 | c.wsvictim#c.cmgirl50 | .0969977 .3710596 0.26 0.794 -.6302657 .8242611 | c.wsvictim#c.cmemosup5 | .0542006 .0675145 0.80 0.422 -.0781255 .1865266 | c.wsvictim#c.cmvictim3 | .1817829 .1467665 1.24 0.215 -.1058741 .4694399 | _cons | 4.21311 .0614271 68.59 0.000 4.092715 4.333505 -----------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0076231 .0045618 .0023591 .0246325 var(_cons) | .0284948 .0158741 .0095625 .0849103 cov(time1,_cons) | .0147383 .0056175 .0037282 .0257484 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0416026 .0158349 .0197303 .0877219 var(wsvictim) | .1048653 .0327554 .056853 .1934239 var(_cons) | .3882002 .0422725 .3135923 .4805584 cov(time1,wsvictim) | -.0141407 .013662 -.0409177 .0126363 cov(time1,_cons) | -.0031839 .0196962 -.0417878 .03542 cov(wsvictim,_cons) | .0238883 .0276229 -.0302515 .0780282 -----------------------------+------------------------------------------------ var(Residual) | .2960629 .019774 .2597361 .3374703 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(9) = 527.49 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2038.384 28 4132.769 4174.671 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Eq 11a.9: Add Level-2 and Level-3 Victim by Within-Student Victim Cross-Level Interactions" Eq 11a.9: Add Level-2 and Level-3 Victim by Within-Student Victim Cross-Level Interactions

. display as result "Final Model Predicting Student Closeness" Final Model Predicting Student Closeness

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 c.wsvictim c.wcvictim c.cmvictim3 /// > c.cmgirl50#c.cmemosup5 c.cmemosup5#c.cmvictim3 /// > c.girl#c.wcvictim c.cmgirl50#c.wcvictim /// > c.wsvictim#c.wcvictim c.wsvictim#c.cmvictim3, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1 wsvictim, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2047.6065 Iteration 1: log restricted-likelihood = -2038.3201 Iteration 2: log restricted-likelihood = -2036.521 Iteration 3: log restricted-likelihood = -2036.3771 Iteration 4: log restricted-likelihood = -2036.3771

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(16) = 112.71 Log restricted-likelihood = -2036.3771 Prob > chi2 = 0.0000

----------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] ------------------------+---------------------------------------------------------------- time1 | -.1308014 .0311154 -4.20 0.000 -.1917864 -.0698164 girl | .2514623 .0679634 3.70 0.000 .1182564 .3846682 | c.time1#c.girl | -.000126 .0383556 -0.00 0.997 -.0753016 .0750497 | cmgirl50 | .5408854 .4752755 1.14 0.255 -.3906375 1.472408 | c.time1#c.cmgirl50 | -1.109138 .2554253 -4.34 0.000 -1.609762 -.6085133 | cmemosup5 | .1061416 .0797856 1.33 0.183 -.0502354 .2625186 | c.time1#c.cmemosup5 | .1687737 .0418501 4.03 0.000 .086749 .2507984 | wsvictim | -.077156 .0446177 -1.73 0.084 -.164605 .0102931 wcvictim | -.0527436 .0516968 -1.02 0.308 -.1540674 .0485803 cmvictim3 | -.0468607 .1780251 -0.26 0.792 -.3957834 .3020621 | c.cmgirl50#c.cmemosup5 | -2.385427 .8918961 -2.67 0.007 -4.133512 -.6373432 | c.cmemosup5#c.cmvictim3 | -.7238364 .3132692 -2.31 0.021 -1.337833 -.1098401 | c.girl#c.wcvictim | -.1511882 .0732343 -2.06 0.039 -.2947248 -.0076515 | c.cmgirl50#c.wcvictim | -.0973461 .3703024 -0.26 0.793 -.8231254 .6284332 | c.wsvictim#c.wcvictim | .1068123 .045436 2.35 0.019 .0177594 .1958651 | c.wsvictim#c.cmvictim3 | .1569692 .1322053 1.19 0.235 -.1021484 .4160868 | _cons | 4.21352 .0611817 68.87 0.000 4.093606 4.333434 -----------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0080349 .0047 .0025531 .0252867 var(_cons) | .0278552 .015614 .0092848 .0835678 cov(time1,_cons) | .0149604 .00567 .0038474 .0260735 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .041014 .0157531 .0193195 .0870703 var(wsvictim) | .0958359 .0315243 .050296 .1826093 var(_cons) | .3875936 .0422181 .3130837 .4798357 cov(time1,wsvictim) | -.0117096 .0133806 -.0379351 .014516 cov(time1,_cons) | -.002729 .0196371 -.0412169 .035759 cov(wsvictim,_cons) | .0169283 .0271885 -.0363601 .0702167 -----------------------------+------------------------------------------------ var(Residual) | .2965802 .0197533 .2602849 .3379366 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(9) = 529.89 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2036.377 27 4126.754 4167.16 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. * Contextual Gender Effect at Wave 1 . lincom c.cmgirl50*1 + c.cmgirl50#c.time1*0

( 1) [close]cmgirl50 = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | .5408854 .4752755 1.14 0.255 -.3906375 1.472408 ------------------------------------------------------------------------------

. * Contextual Gender Effect at Wave 2 . lincom c.cmgirl50*1 + c.cmgirl50#c.time1*1

( 1) [close]cmgirl50 + [close]c.time1#c.cmgirl50 = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -.5682523 .5619265 -1.01 0.312 -1.669608 .5331034 ------------------------------------------------------------------------------

. * Contextual Gender Effect at Wave 3 . lincom c.cmgirl50*1 + c.cmgirl50#c.time1*2

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

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -1.67739 .7322022 -2.29 0.022 -3.11248 -.2423 ------------------------------------------------------------------------------

. * Between-Class Emotional Support Effect at Wave 1 . lincom c.cmemosup5*1 + c.cmemosup5#c.time1*0

( 1) [close]cmemosup5 = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | .1061416 .0797856 1.33 0.183 -.0502354 .2625186 ------------------------------------------------------------------------------

. * Between-Class Emotional Support Effect at Wave 2 . lincom c.cmemosup5*1 + c.cmemosup5#c.time1*1

( 1) [close]cmemosup5 + [close]c.time1#c.cmemosup5 = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | .2749153 .0948929 2.90 0.004 .0889286 .4609019 ------------------------------------------------------------------------------

. * Between-Class Emotional Support Effect at Wave 3 . lincom c.cmemosup5*1 + c.cmemosup5#c.time1*2

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

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | .443689 .1230708 3.61 0.000 .2024745 .6849034 ------------------------------------------------------------------------------

. * Level-2 Victim Effect in Girls . lincom c.wcvictim*1 + c.wcvictim#c.girl*1

( 1) [close]wcvictim + [close]c.girl#c.wcvictim = 0

------------------------------------------------------------------------------ close | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -.2039317 .050705 -4.02 0.000 -.3033117 -.1045517 ------------------------------------------------------------------------------

. predict FinalC, xb,

. corr close FinalC (obs=1731)

| close FinalC -------------+------------------ close | 1.0000 FinalC | 0.3244 1.0000



. . display as result "Ch 11a: Add Level-2 and Level-3 Gender by Within-Student Victim Cross-Level Interactions" Ch 11a: Add Level-2 and Level-3 Gender by Within-Student Victim Cross-Level Interactions

. display as result "Predicting Student Closeness" Predicting Student Closeness

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 c.wsvictim c.wcvictim c.cmvictim3 /// > c.cmgirl50#c.cmemosup5 c.cmemosup5#c.cmvictim3 /// > c.girl#c.wcvictim c.cmgirl50#c.wcvictim c.wsvictim#c.wcvictim c.wsvictim#c.cmvictim3 /// > c.wsvictim#c.girl c.wsvictim#c.cmgirl50, /// > || classid: time1, variance reml covariance(unstructured) /// > || studentid: time1 wsvictim, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log restricted-likelihood = -2048.9614 Iteration 1: log restricted-likelihood = -2039.7533 Iteration 2: log restricted-likelihood = -2037.905 Iteration 3: log restricted-likelihood = -2037.7443 Iteration 4: log restricted-likelihood = -2037.7443

Computing standard errors:

Mixed-effects REML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(18) = 113.52 Log restricted-likelihood = -2037.7443 Prob > chi2 = 0.0000

----------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] ------------------------+---------------------------------------------------------------- time1 | -.1329639 .0312404 -4.26 0.000 -.194194 -.0717338 girl | .2465768 .0682213 3.61 0.000 .1128654 .3802881 | c.time1#c.girl | .0043529 .0386984 0.11 0.910 -.0714947 .0802004 | cmgirl50 | .5561032 .4760266 1.17 0.243 -.3768917 1.489098 | c.time1#c.cmgirl50 | -1.120723 .2561278 -4.38 0.000 -1.622724 -.6187216 | cmemosup5 | .106922 .0798179 1.34 0.180 -.0495181 .2633622 | c.time1#c.cmemosup5 | .1680733 .0418878 4.01 0.000 .0859746 .250172 | wsvictim | -.0486283 .0578548 -0.84 0.401 -.1620217 .064765 wcvictim | -.0526109 .0516992 -1.02 0.309 -.1539394 .0487177 cmvictim3 | -.0438822 .1781922 -0.25 0.805 -.3931326 .3053682 | c.cmgirl50#c.cmemosup5 | -2.403058 .8923216 -2.69 0.007 -4.151977 -.6541401 | c.cmemosup5#c.cmvictim3 | -.7252085 .3133817 -2.31 0.021 -1.339425 -.1109917 | c.girl#c.wcvictim | -.1515232 .0732361 -2.07 0.039 -.2950634 -.0079831 | c.cmgirl50#c.wcvictim | -.09868 .3703038 -0.27 0.790 -.8244621 .6271022 | c.wsvictim#c.wcvictim | .1064831 .0455045 2.34 0.019 .0172958 .1956704 | c.wsvictim#c.cmvictim3 | .1641968 .1367997 1.20 0.230 -.1039257 .4323193 | c.wsvictim#c.girl | -.0623805 .0729039 -0.86 0.392 -.2052695 .0805086 | c.wsvictim#c.cmgirl50 | .1826437 .3679684 0.50 0.620 -.5385611 .9038485 | _cons | 4.21563 .0612722 68.80 0.000 4.095539 4.335722 -----------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0080469 .004709 .0025557 .0253363 var(_cons) | .0278582 .015617 .0092849 .0835851 cov(time1,_cons) | .0149724 .0056714 .0038566 .0260881 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .0411276 .0157678 .0193996 .0871912 var(wsvictim) | .0971402 .0318033 .0511351 .184535 var(_cons) | .3882196 .0422498 .3136473 .4805222 cov(time1,wsvictim) | -.0122918 .0134586 -.0386702 .0140865 cov(time1,_cons) | -.0031371 .0196609 -.0416717 .0353975 cov(wsvictim,_cons) | .0187236 .0273026 -.0347885 .0722356 -----------------------------+------------------------------------------------ var(Residual) | .2965825 .0197427 .2603055 .3379152 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(9) = 529.15 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2037.744 29 4133.489 4176.887 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . display as result "Eq 11a.9: Add Level-2 and Level-3 Victim by Within-Student Victim Cross-Level Interactions" Eq 11a.9: Add Level-2 and Level-3 Victim by Within-Student Victim Cross-Level Interactions

. display as result "Predicting Student Closeness using ML instead of REML" Predicting Student Closeness using ML instead of REML

. mixed close c.time1 c.girl c.time1#c.girl c.cmgirl50 c.time1#c.cmgirl50 /// > c.cmemosup5 c.time1#c.cmemosup5 c.wsvictim c.wcvictim c.cmvictim3 /// > c.cmgirl50#c.cmemosup5 c.cmemosup5#c.cmvictim3 /// > c.girl#c.wcvictim c.cmgirl50#c.wcvictim /// > c.wsvictim#c.wcvictim c.wsvictim#c.cmvictim3, /// > || classid: time1, variance mle covariance(unstructured) /// > || studentid: time1 wsvictim, covariance(unstructured),

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log likelihood = -2023.8052 Iteration 1: log likelihood = -2014.2975 Iteration 2: log likelihood = -2012.4478 Iteration 3: log likelihood = -2012.2463 Iteration 4: log likelihood = -2012.2463 Iteration 5: log likelihood = -2012.2463

Computing standard errors:

Mixed-effects ML regression Number of obs = 1731

----------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+------------------------------------------ classid | 33 27 52.5 73 studentid | 597 1 2.9 3 -----------------------------------------------------------

Wald chi2(16) = 116.96 Log likelihood = -2012.2463 Prob > chi2 = 0.0000

----------------------------------------------------------------------------------------- close | Coef. Std. Err. z P>|z| [95% Conf. Interval] ------------------------+---------------------------------------------------------------- time1 | -.1310207 .0305992 -4.28 0.000 -.1909941 -.0710473 girl | .2514796 .0675091 3.73 0.000 .1191642 .383795 | c.time1#c.girl | -.0002382 .0381852 -0.01 0.995 -.0750798 .0746034 | cmgirl50 | .5280943 .4471273 1.18 0.238 -.3482591 1.404448 | c.time1#c.cmgirl50 | -1.110349 .2497537 -4.45 0.000 -1.599857 -.6208403 | cmemosup5 | .1062493 .0748706 1.42 0.156 -.0404945 .252993 | c.time1#c.cmemosup5 | .1691402 .0408667 4.14 0.000 .0890429 .2492375 | wsvictim | -.0770034 .0443597 -1.74 0.083 -.1639468 .00994 wcvictim | -.051947 .0513974 -1.01 0.312 -.1526841 .0487901 cmvictim3 | -.0481655 .1681145 -0.29 0.774 -.3776638 .2813329 | c.cmgirl50#c.cmemosup5 | -2.401929 .8427474 -2.85 0.004 -4.053683 -.7501742 | c.cmemosup5#c.cmvictim3 | -.7080731 .2957163 -2.39 0.017 -1.287666 -.1284799 | c.girl#c.wcvictim | -.1522848 .0727591 -2.09 0.036 -.29489 -.0096796 | c.cmgirl50#c.wcvictim | -.094474 .3684311 -0.26 0.798 -.8165857 .6276378 | c.wsvictim#c.wcvictim | .1068194 .045155 2.37 0.018 .0183171 .1953216 | c.wsvictim#c.cmvictim3 | .1567181 .1313206 1.19 0.233 -.1006656 .4141017 | _cons | 4.213819 .0584536 72.09 0.000 4.099252 4.328386 -----------------------------------------------------------------------------------------

------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ classid: Unstructured | var(time1) | .0071936 .0041779 .0023046 .0224547 var(_cons) | .0203508 .011871 .0064873 .0638413 cov(time1,_cons) | .0120994 .0046142 .0030557 .0211432 -----------------------------+------------------------------------------------ studentid: Unstructured | var(time1) | .039638 .0156221 .0183078 .0858198 var(wsvictim) | .0922537 .0308863 .0478634 .1778131 var(_cons) | .379242 .0414782 .306069 .4699088 cov(time1,wsvictim) | -.0117207 .0131724 -.0375381 .0140967 cov(time1,_cons) | -.0001901 .019388 -.0381898 .0378095 cov(wsvictim,_cons) | .0161922 .0267079 -.0361543 .0685387 -----------------------------+------------------------------------------------ var(Residual) | .2965763 .0197105 .2603547 .3378371 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(9) = 522.46 Prob > chi2 = 0.0000

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

. estat ic, n(33),

Akaike's information criterion and Bayesian information criterion

----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 33 . -2012.246 27 4078.493 4118.898 ----------------------------------------------------------------------------- Note: N=33 used in calculating BIC

. . ****** END CHAPTER 11a MODELS ****** . . * Close log . log close STATA_Chapter11a name: STATA_Chapter11a log: C:\Dropbox\PilesOfVariance\Chapter11a\STATA\STATA_Chapter11a_Output.smcl log type: smcl closed on: 25 Oct 2014, 11:05:13 ------------------------------------------------------------------------------------------------------------------------------------------------------