1 / 60

Chapter 7 The Mixed, Random Effects Model – Part I: Continuous Outcomes

Longitudinal Data Fall 2006. Chapter 7 The Mixed, Random Effects Model – Part I: Continuous Outcomes. Instructors Alan Hubbard Nick Jewell. What’s being “Mixed”?. A mixed model has two types of effects, fixed and random .

Download Presentation

Chapter 7 The Mixed, Random Effects Model – Part I: Continuous Outcomes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Longitudinal DataFall 2006 Chapter 7 The Mixed, Random Effects Model – Part I: Continuous Outcomes Instructors Alan Hubbard Nick Jewell

  2. What’s being “Mixed”? • A mixed model has two types of effects, fixed and random. • A fixed effect means that all levels of the variable are contained in the data and the effect is universal to all in the target population. • A random effect means that the levels (effects) of the variable comprise random samples of the levels (effects) in the target population. • Consider a treatment effect. Fixed, Random, Both?

  3. Why Use mixed models? • The model implies correlation between measurements on the same subject (note previous examples and assignments). • Permits one to specify a rich set of correlation models and allows for heteroskedascity. • It allows different subjects to have different responses to a treatment, risk variable, etc., thus has intuitive appeal. • Estimation can return both fixed effects and estimate the variability of different factors in your data (e.g., within-subject, between subject, clinic,etc.).

  4. Estimation of coefficients using mixed models • As we’ve showed in class and homework, random effects models imply certain variance-covariance structures. • For instance, a simple random effects model results in equal correlation (exchangeable or compound symmetry) among all observations measured on the same subject. • We know that if the variance-covariance matrix (V) is known, then the most efficient estimate of the coefficients is weighted-least squares: where W = V-1. • W

  5. Estimation of coefficients using mixed models, cont. • The Mixed Model procedure works by: • Converting the random effects model into its implied variance-covariance matrix, V, • starting with the independent model (OLS) it gets residuals and then estimates V based on this model, • creates weight matrix as , • does weighted least squares and gets residuals, • repeats until convergence. • The SE’s the procedure return come from:

  6. Danger of using mixed models for continuous outcomes • When deriving the inference on coefficients, the estimating procedure assumes that the variance-covariance model of the outcome implied by the model IS CORRECT (i.e., it’s always naïve, not “robust”).

  7. The Simplest Example. • The Model: • E(i)=0, E(eij)=0, E[i eij]=0. • Var(i)= 2. • Var(eij)= 2e . • What are the fixed and random effects in this model?

  8. A more complicated example. • The Model: • E(0i)=0, E(1i)=0, E(eij)=0. • Var(0i)= 20, Var(1i)= 21, Var(eij)= 2 • cov(0i, 1i)= 12, cov(0i, eij)=0, cov(1i, eij)=0. • What are the fixed and random effects in this model?

  9. Association of Baseline Covariate (Age) on CD4 count. • Binary age (Xij) = 0 (<40) or 1 (>40) • Fit simple linear model: • Compare results of Models A-D

  10. Summary of Results of Association of Baseline Covariate (Age) on CD4 count

  11. Random Effects Model of CD4 vs. Baseline Age • Fit simple random effects model: with same assumptions as above . xtreg cd4 binage, i(id) re Random-effects GLS regression Number of obs = 594 Group variable (i): id Number of groups = 297 R-sq: within = . Obs per group: min = 2 between = 0.0054 avg = 2.0 overall = 0.0049 max = 2 Random effects u_i ~ Gaussian Wald chi2(1) = 1.59 corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.2075 ------------------------------------------------------------------------------ cd4 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- est of binage 24.2404 19.22938 1.26 0.207 -13.44848 61.92928 est of  _cons 225.902 13.38962 16.87 0.000 199.6588 252.1451 -------------+---------------------------------------------------------------- sigma_u | 157.74218 estimate of 20 sigma_e | 71.379705 estimate of2 rho | .83003801 (fraction of variance due to u_i) ------------------------------------------------------------------------------

  12. Association of Time-Varying Covariate (Viral Load) on CD4 count. • Binary VL: Xij = 0 (<2000) or 1 (>2000) – all subjects included have one low and one high VL. • Fit simple linear model: • Compare results of Models A-D

  13. Summary of Results of Association of Time Varying Covariate (VL) on CD4 count (note, different data that last lecture)

  14. Random Effects Model of CD4 vs. log10(viral load) • Fit simple random effects model: with same assumptions as above . xtreg cd4 medvl, i(id) re Random-effects GLS regression Number of obs = 174 Group variable (i): id Number of groups = 87 R-sq: within = 0.0000 Obs per group: min = 2 between = 0.0000 avg = 2.0 overall = 0.0370 max = 2 Random effects u_i ~ Gaussian Wald chi2(1) = 21.44 corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ cd4 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- medvl | -79.34483 17.13523 -4.63 0.000 -112.9293 -45.76039 _cons | 355.0805 21.80987 16.28 0.000 312.3339 397.827 -------------+---------------------------------------------------------------- sigma_u | 169.148 estimate of 20 sigma_e | 113.0146 estimate of2 rho | .69136617 (fraction of variance due to u_i) ------------------------------------------------------------------------------

  15. Multiple and varying observations per person CD4 (Y) vs. continuous (log) Viral Load (X) • 2represents the expected change in Y given a change in Xij relative to the baseline value (Xi1) - longitudinal effect. • 1 represents the expected difference in average Y across two sub-populations that differ by their baseline values, Xi1 - cross-sectional effect.

  16. Summary of Results of Association of Time-Varying Covariate (VL) on CD4 count – multiple observations per person

  17. Random Effects Model of CD4 vs. log10(viral load) Fit simple random effects model: Random-effects GLS regression Number of obs = 7053 Group variable (i): id Number of groups = 406 R-sq: within = 0.1024 Obs per group: min = 1 between = 0.2423 avg = 17.4 overall = 0.1841 max = 58 Random effects u_i ~ Gaussian Wald chi2(2) = 834.72 corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ cd4 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- logvlbase | -52.16759 7.733616 -6.75 0.000 -67.3252 -37.00998 logvlchange | -53.67891 1.859443 -28.87 0.000 -57.32335 -50.03447 _cons | 506.9675 32.73488 15.49 0.000 442.8084 571.1267 -------------+---------------------------------------------------------------- sigma_u | 176.47579 sigma_e | 108.38743 rho | .72610367 (fraction of variance due to u_i) ------------------------------------------------------------------------------

  18. Random Coefficients Model of CD4 vs. log10(viral load) Fit random coef. model: Fixed Effects (Coefficient) Estimates . xtmixed cd4 logvlbase logvlchange || id: logvlbase Mixed-effects REML regression Number of obs = 7053 Group variable: id Number of groups = 406 Obs per group: min = 1 avg = 17.4 max = 58 Wald chi2(2) = 828.31 Log restricted-likelihood = -43817.853 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ cd4 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- logvlbase | -51.98204 8.176032 -6.36 0.000 -68.00677 -35.95731 logvlchange | -53.37247 1.8559 -28.76 0.000 -57.00997 -49.73498 _cons | 506.2758 33.67954 15.03 0.000 440.2651 572.2865 ------------------------------------------------------------------------------

  19. Random Coefficients Model of CD4 vs. log10(viral load) Fit random coef. model: Variance Components Estimates ------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ id: Independent | var(1i) sd(logvlb~e) | 19.6903 6.997558 9.811865 39.5142 var(0i) sd(_cons) | 167.2211 15.38626 139.6274 200.2679 -----------------------------+------------------------------------------------ var(eij) sd(Residual) | 108.3978 .9403761 106.5702 110.2566 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(2) = 7444.62 Prob > chi2 = 0.0000

  20. Dental Data

  21. Dental Data

  22. Mixed Model I for Dental Data • First, the Model where xij, is the jth age of ith child, Yij is the distance. • E(0i)=0, E(eij)=0. • Var(0i)= 20, Var(eij)= 2 • cov(0i, eij)=0. • What are the fixed and random effects in this model?

  23. SAS – Dental Model I Code proc mixed data=temp1; class child; model distance = age / s; random int / sub=child s; run; Output Covariance Parameter Estimates Cov Parm Subject Estimate Intercept child 4.472120 Residual 2.0495 2 Fit Statistics -2 Res Log Likelihood 447.0 AIC (smaller is better) 451.0 AICC (smaller is better) 451.1 BIC (smaller is better) 453.6

  24. SAS – Dental Model I, cont. Solution for Fixed Effects Standard Effect Estimate Error DF t Value Pr > |t| Intercept 16.7611 0.8024 26 20.89 <.0001 age 0.6602 0.06161 80 10.72 <.0001 Solution for Random Effects 0i Std Err Effect child Estimate Pred DF t Value Pr > |t| Intercept 1 -2.3759 0.7799 80 -3.05 0.0031 Intercept 2 -0.9180 0.7799 80 -1.18 0.2427 Intercept 3 -0.2451 0.7799 80 -0.31 0.7542 Intercept 4 0.7643 0.7799 80 0.98 0.3301 Intercept 5 -1.2544 0.7799 80 -1.61 0.1117 Intercept 6 -2.6002 0.7799 80 -3.33 0.0013 Intercept 7 -0.9180 0.7799 80 -1.18 0.2427 Intercept 8 -0.5815 0.7799 80 -0.75 0.4581 Intercept 9 -2.6002 0.7799 80 -3.33 0.0013

  25. STATA – XTREG . xtreg distance age, i(child) re Random-effects GLS regression Number of obs = 108 Group variable (i) : child Number of groups = 27 R-sq: within = 0.5894 Obs per group: min = 4 between = . avg = 4.0 overall = 0.2565 max = 4 Random effects u_i ~ Gaussian Wald chi2(1) = 114.84 corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ distance | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | .6601852 .0616059 10.72 0.000 .5394398 .7809306 _cons | 16.76111 .8023952 20.89 0.000 15.18845 18.33378 -------------+---------------------------------------------------------------- 0 sigma_u | 2.1147235  sigma_e | 1.4315921 rho | .68573911 (fraction of variance due to u_i) ------------------------------------------------------------------------------

  26. STATA – xtmixed . xtmixed distance age || child: Performing EM optimization: Performing gradient-based optimization: Computing standard errors: Mixed-effects REML regression Number of obs = 108 Group variable: child Number of groups = 27 Obs per group: min = 4 avg = 4.0 max = 4 Wald chi2(1) = 114.84 Log restricted-likelihood = -223.50126 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ distance | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | .6601852 .0616059 10.72 0.000 .5394398 .7809306 _cons | 16.76111 .8023952 20.89 0.000 15.18845 18.33378 ------------------------------------------------------------------------------

  27. STATA – xtmixed Variance Components Estimates ------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ child: Identity | 0 sd(_cons) | 2.114724 .3274189 1.561218 2.864466 -----------------------------+------------------------------------------------  sd(Residual) | 1.431592 .1131773 1.2261 1.671524 ------------------------------------------------------------------------------ LR test vs. linear regression: chibar2(01) = 62.17 Prob >= chibar2 = 0.0000

  28. STATA – gllamm (see http://www.gllamm.org/) gllamm distance age, i(child) adapt number of level 1 units = 108 number of level 2 units = 27 Condition Number = 24.561436 gllamm model log likelihood = -221.69477 ------------------------------------------------------------------------------ distance | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | .6601852 .0612245 10.78 0.000 .5401875 .7801829 _cons | 16.76111 .7945636 21.09 0.000 15.2038 18.31843 ------------------------------------------------------------------------------ Variance at level 1 ----------------------------------------------------------------------------- 2.0241542 (.31806515) 2 Variances and covariances of random effects ----------------------------------------------------------------------------- ***level 2 (child) 20 var(1): 4.2937749 (1.3087616)

  29. STATA – XTGEE non-robust . xtgee distance age, i(child) cor(exc) Iteration 1: tolerance = 4.001e-16 GEE population-averaged model Number of obs = 108 Group variable: child Number of groups = 27 Link: identity Obs per group: min = 4 Family: Gaussian avg = 4.0 Correlation: exchangeable max = 4 Wald chi2(1) = 116.27 Scale parameter: 6.317927 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ distance | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | .6601852 .0612245 10.78 0.000 .5401875 .7801829 _cons | 16.76111 .7945636 21.09 0.000 15.2038 18.31843 ------------------------------------------------------------------------------

  30. STATA – XTGEE robust for comparison Iteration 1: tolerance = 4.001e-16 GEE population-averaged model Number of obs = 108 Group variable: child Number of groups = 27 Link: identity Obs per group: min = 4 Family: Gaussian avg = 4.0 Correlation: exchangeable max = 4 Wald chi2(1) = 85.85 Scale parameter: 6.317927 Prob > chi2 = 0.0000 (standard errors adjusted for clustering on child) ------------------------------------------------------------------------------ | Semi-robust distance | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | .6601852 .0712533 9.27 0.000 .5205313 .799839 _cons | 16.76111 .7752462 21.62 0.000 15.24166 18.28057 ------------------------------------------------------------------------------ Note, that the robust SE’s are not the same as the non-robust

  31. Mixed Model II for Dental Data • The Model (called a random coefficients model) • E(0i)=0, E(1i)=0, E(eij)=0. • Var(0i)= 20, Var(1i)= 21, Var(eij)= 2 • cov(0i, 1i)= 12, cov(0i, eij)=0, cov(1i, eij)=0.

  32. SAS – Dental Model II Code proc mixed data=temp1; class child; model distance = age / s; random int age / sub=child s; run; Output Cov Parm Subject Estimate Intercept child 1.9211 20 age child 0.02228 21 Residual 1.8787 2 Fit Statistics -2 Res Log Likelihood 443.3 AIC (smaller is better) 449.3 AICC (smaller is better) 449.5 BIC (smaller is better) 453.2

  33. SAS – Dental Model II, cont. Solution for Fixed Effects Standard Effect Estimate Error DF t Value Pr > |t| Intercept 16.7611 0.7138 26 23.48 <.0001 age 0.6602 0.06561 26 10.06 <.0001 Solution for Random Effects 0i, 1i Std Err Effect child Estimate Pred DF t Value Pr > |t| Intercept 1 -0.8605 1.0693 54 -0.80 0.4245 age 1 -0.1434 0.09948 54 -1.44 0.1553 Intercept 2 -0.5541 1.0693 54 -0.52 0.6064 age 2 -0.03033 0.09948 54 -0.30 0.7617 Intercept 3 -0.2831 1.0693 54 -0.26 0.7922 age 3 0.007197 0.09948 54 0.07 0.9426 Intercept 4 0.5223 1.0693 54 0.49 0.6272 age 4 0.01835 0.09948 54 0.18 0.8543 Intercept 5 -0.2463 1.0693 54 -0.23 0.8187 age 5 -0.09924 0.09948 54 -1.00 0.3230

  34. STATA for Model II– xtmixed . xtmixed distance age || child: age, cov(uns) Mixed-effects REML regression Number of obs = 108 Group variable: child Number of groups = 27 Obs per group: min = 4 avg = 4.0 max = 4 Wald chi2(1) = 85.85 Log restricted-likelihood = -221.31834 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ distance | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | .6601852 .0712533 9.27 0.000 .5205314 .799839 _cons | 16.76111 .775246 21.62 0.000 15.24166 18.28057 ------------------------------------------------------------------------------

  35. STATA for Model II– xtmixed Variance Components Estimates ------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ child: Unstructured | 1 sd(age) | .2264277 .0915312 .1025274 .5000568 0 sd(_cons) | 2.327034 1.065366 .9486467 5.708223 12corr(age,_cons) | -.6093328 .3255995 -.9382101 .2978612 -----------------------------+------------------------------------------------ sd(Residual) | 1.31004 .1260584 1.08487 1.581944 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(3) = 66.53 Prob > chi2 = 0.0000 Note: LR test is conservative and provided only for reference

  36. STATA for Model II– xtmixed – random coefficient estimates . predict b*, reffects . list b* +-----------------------+ | 1i, b1 0i,b2 | |-----------------------| 1. | -.1782096 -.4859597 | 5. | .009858 -1.011849 | 9. | .0506423 -.7727903 | 13. | -.0298621 1.069163 |

  37. STATA for Model II– gllamm . gen byte one = 1 . eq cons : one . eq age: age . gllamm distance age, i(child) nrf(2) eqs(age cons) adapt log likelihood = -220.0416 ------------------------------------------------------------------------------ distance | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | .6601823 .0644603 10.24 0.000 .5338425 .7865221 _cons | 16.76109 .6919827 24.22 0.000 15.40483 18.11736 ------------------------------------------------------------------------------ Variance at level 1 ----------------------------------------------------------------------------- 1.9081616 (.31302351) 2 Variances and covariances of random effects ----------------------------------------------------------------------------- ***level 2 (child) var(1): .01753825 (.02181136) 21 cov(1,2): .05965195 (.11116902) cor(1,2): .47072182 var(2): .91566017 (1.034421) 20 -----------------------------------------------------------------------------

  38. Comparison of Results for Dental Data

  39. Strength Data • Subjects randomized to one of 3 treatments • No training (tx=1) • Weight training with light weights and high repetition (tx=2) • Weight training with heavy weights and low repetition (tx=3) • Subjects were followed for 7 weeks and a measure of muscle strength was recorded each week. • The questions of interest are • Does weight training have any impact on strength? • Is there a difference between tx 2 and 3? • Which training program works quickest to increase strength?

  40. Strength Data id tx y time 1. 1 1 85 1 2. 1 1 85 2 3. 1 1 86 3 4. 1 1 85 4 5. 1 1 87 5 6. 1 1 86 6 7. 1 1 . 7 8. 2 1 80 1 9. 2 1 79 2 10. 2 1 . 3 11. 2 1 78 4 12. 2 1 78 5 13. 2 1 79 6 14. 2 1 . 7

  41. Mixed Model I for Strength Data • First, the Model (xij, time of ijth measurement, Txi is the treatment assignment for ith person). • E(0i)=0, E(eij)=0. • Var(0i)= 20, Var(eij)= 2 • cov(0i, eij)=0. • What are the fixed and random effects in this model?

  42. SAS – Strength Model I Code proc mixed data=temp1; class id tx; model y = time tx tx*time / s; random int / sub=id s; run; Output Cov Parm Subject Estimate Intercept id 9.3645 20 Residual 1.1668 2 Fit Statistics -2 Res Log Likelihood 1336.2 AIC (smaller is better) 1340.2 AICC (smaller is better) 1340.2 BIC (smaller is better) 1344.2

  43. SAS Strength Model I, cont. Solution for Fixed Effects Standard Effect tx Estimate Error DF t Value Pr > |t| Intercept 81.0184 0.6986 54 115.98 <.0001 time 0.3039 0.04851 310 6.27 <.0001 tx 1 -0.9567 0.9998 310 -0.96 0.3394 tx 2 -1.1488 1.0618 310 -1.08 0.2801 tx 3 0 . . . . time*tx 1 -0.3732 0.06837 310 -5.46 <.0001 time*tx 2 -0.06113 0.07178 310 -0.85 0.3951 time*tx 3 0 . . . . Solution for Random Effects 0i Std Err Effect id Estimate Pred DF t Value Pr > |t| Intercept 1 5.7287 0.8055 310 7.11 <.0001 Intercept 2 -0.9875 0.8259 310 -1.20 0.2328 Intercept 3 -2.8760 0.7902 310 -3.64 0.0003 Intercept 4 4.2823 0.7902 310 5.42 <.0001 Intercept 5 0.07153 0.7902 310 0.09 0.9279 Intercept 6 -2.8760 0.7902 310 -3.64 0.0003 Intercept 7 -0.2092 0.7902 310 -0.26 0.7914

  44. ANOVA table from SAS Strength Model I Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F time 1 310 30.49 <.0001 tx 2 310 0.72 0.4880 time*tx 2 310 16.93 <.0001

  45. STATA for Strength Data - XTREG . gen tx1 = tx==1 . gen tx2 = tx==2 . gen tx1time = tx1*time . gen tx2time = tx2*time . xi: xtreg y tx1 tx2 time tx1time tx2time, i(id) re mle Random-effects ML regression Number of obs = 370 Group variable (i) : id Number of groups = 57 Random effects u_i ~ Gaussian Obs per group: min = 5 avg = 6.5 max = 7 LR chi2(5) = 63.37 Log likelihood = -663.52557 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ y | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- tx1 | -.9568027 .9747104 -0.98 0.326 -2.8672 .9535947 tx2 | -1.148717 1.035118 -1.11 0.267 -3.177512 .8800772 time | .3038536 .048275 6.29 0.000 .2092364 .3984709 tx1time | -.3731916 .0680398 -5.48 0.000 -.5065472 -.2398361 tx2time | -.0611408 .0714338 -0.86 0.392 -.2011484 .0788669 _cons | 81.0185 .6810685 118.96 0.000 79.68363 82.35337 -------------+---------------------------------------------------------------- /sigma_u | 2.97753 .2846527 10.46 0.000 2.419621 3.535439 /sigma_e | 1.074968 .0429662 25.02 0.000 .9907563 1.159181 -------------+---------------------------------------------------------------- rho | .8846892 .0212074 .8376945 .9210974 ------------------------------------------------------------------------------ Likelihood ratio test of sigma_u=0: chibar2(01)= 571.45 Prob>=chibar2 = 0.000

  46. STATA for Strength Data, cont. • Test of no treatment effect, H0: b4 = b5 = 0. . test tx1time tx2time ( 1) [y]tx1time = 0.0 ( 2) [y]tx2time = 0.0 chi2( 2) = 34.17 Prob > chi2 = 0.0000

  47. xtmixed – Model I . xtmixed y tx1 tx2 time tx1time tx2time || id: Mixed-effects REML regression Number of obs = 370 Group variable: id Number of groups = 57 Obs per group: min = 5 avg = 6.5 max = 7 Wald chi2(5) = 68.42 Log restricted-likelihood = -668.07997 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ y | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- tx1 | -.9567196 .9999082 -0.96 0.339 -2.916504 1.003064 tx2 | -1.148772 1.061883 -1.08 0.279 -3.230024 .9324795 time | .3039116 .0485081 6.27 0.000 .2088375 .3989858 tx1time | -.37324 .0683687 -5.46 0.000 -.5072402 -.2392398 tx2time | -.0611334 .0717795 -0.85 0.394 -.2018186 .0795518 _cons | 81.01837 .6986625 115.96 0.000 79.64902 82.38773 ------------------------------------------------------------------------------

  48. xtmixed, cont. Variance Components Estimates ------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ id: Identity | 0 sd(_cons) | 3.060554 .3003359 2.525053 3.70962 -----------------------------+------------------------------------------------ sd(Residual) | 1.080153 .0433823 .9983853 1.168616 ------------------------------------------------------------------------------ LR test vs. linear regression: chibar2(01) = 570.44 Prob >= chibar2 = 0.0000 Wald-type test of treatment effect . test tx1time tx2time ( 1) [y]tx1time = 0 ( 2) [y]tx2time = 0 chi2( 2) = 33.85 Prob > chi2 = 0.0000

  49. STATA for Strength Data - gllamm . . gllamm y tx1 tx2 time tx1time tx2time, i(id) adapt log likelihood = -663.52557 ------------------------------------------------------------------------------ y | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- tx1 | -.9568027 .974711 -0.98 0.326 -2.867201 .9535958 tx2 | -1.148717 1.035119 -1.11 0.267 -3.177513 .8800785 time | .3038536 .0482754 6.29 0.000 .2092356 .3984717 tx1time | -.3731916 .0680403 -5.48 0.000 -.5065482 -.239835 tx2time | -.0611408 .0714343 -0.86 0.392 -.2011495 .078868 _cons | 81.0185 .6810689 118.96 0.000 79.68363 82.35337 ------------------------------------------------------------------------------ Variance at level 1 ----------------------------------------------------------------------------- 1.1555573 (.09237644) 2 Variances and covariances of random effects ----------------------------------------------------------------------------- ***level 2 (id) var(1): 8.8656872 (1.6951244) 20 -----------------------------------------------------------------------------

More Related