Download presentation
Presentation is loading. Please wait.
Published byElaine Parks Modified over 9 years ago
1
Lecture 4 Linear random coefficients models
2
Rats example 30 young rats, weights measured weekly for five weeks Dependent variable (Y ij ) is weight for rat “i” at week “j” Data: Multilevel: weights (observations) within rats (clusters)
3
Individual & population growth Pop line (average growth) Individual Growth Lines Rat “i” has its own expected growth line: There is also an overall, average population growth line: Weight Study Day (centered)
4
Improving individual-level estimates Possible Analyses 1.Each rat (cluster) has its own line: intercept= b i0, slope= b i1 2.All rats follow the same line: b i0 = 0, b i1 = 1 3.A compromise between these two: Each rat has its own line, BUT… the lines come from an assumed distribution E(Y ij | b i0, b i1 ) = b i0 + b i1 X j b i0 ~ N( 0, 0 2 ) b i1 ~ N( 1, 1 2 ) “Random Effects”
5
Pop line (average growth) Bayes-Shrunk Individual Growth Lines A compromise: Each rat has its own line, but information is borrowed across rats to tell us about individual rat growth Weight Study Day (centered)
6
Bayes-Shrunk Growth Lines Bayesian paradigm provides methods for “borrowing strength” or “shrinking” Pop line (average growth) Weight Study Day (centered) Pop line (average growth) Study Day (centered) Weight Individual Growth Lines Bayes
7
Inner-London School data: How effective are the different schools? (gcse.dat,Chap 3) Outcome: score exam at age 16 (gcse) Data are clustered within schools Covariate: reading test score at age 11 prior enrolling in the school (lrt) Goal: to examine the relationship between the score exam at age 16 and the score at age 11 and to investigate how this association varies across schools
8
Fig 3.1: Scatterplot of gcse vs lrt for school 1 with regression line)
9
Linear regression model with random intercept and random slope centered
10
Alternative Representation Linear regression model with random intercept and random slope
11
Fig 3.3: Scatterplot of intercepts and slopes for all schools with at least 5 students
12
Linear regression model with random intercept and random slope The total residual variance is said to be heteroskedastic because depends on x Model with random intercept only
13
Empirical Bayes Prediction (xtmixed reff*,reffects) In stata we can calculate: EB: borrow strength across schools MLE: DO NOT borrow strength across Schools
14
Random InterceptRandom Intercept and Slope EstSEEstSE _cons0.020.40-0.120.40 lrt0.560.010.560.02 Random xtmixed Tau_113.040.0313.010.30 Tau_220.120.02 Rho_210.500.15 Sigma7.520.847.440.08 gllamm Tau_11^29.211.839.041.83 Tau_22^20.010.00 Tau_210.180.07 Sigma^256.571.2755.371.25 Correlation between random effects Between Schools variance Within school variance
15
Fig 3.9: Scatter plot of EB versus ML estimates
16
Fig 3.10: EB predictions of school-specific lines
17
Random Intercept EB estimates and ranking (Fig 3.11)
18
Growth-curve modelling (asian.dta) Measurements of weight were recorded for children up to 4 occasions at 6 weeks, and then at 8,12, and 27 months Goal: We want to investigate the growth trajectories of children’s weights as they get older Both shape of the trajectories and the degree of variability are of interest
19
Fig 3.12: Observed growth trajectories for boys and girls
20
What we see in Fig 3.12? Growth trajectories are not linear We will model this by including a quadratic term for age Some children are consistent heavier than others, so a random intercept appears to be warranted
21
Quadratic growth model with random intercept and random slope Fixed effectsRandom effects Random effects are multivariate normal with means 0, standard deviations tau_11 and tau_22 and covariance tau_12
22
Random InterceptRandom Intercept and Slope EstSEEstSE _cons3.430.183.490.14 Age7.820.297.700.24 Age^2-1.710.11-1.660.09 Random Tau_110.920.100.640.13 Tau_220.5009.09 Rho_210.270.33 Sigma0.730.050.580.05 Random intercept standard deviation Level-1 residual standard deviation Results for Quadratic Growth Random Effects Model Correlation between baseline and linear random effects….
23
Two-stage model formulation Stage 1 Stage 2 Fixed EffectsRandom Effects
24
Results from Random intercept and slope model with and without inclusion of gender effect Random Intercept and Slope EstSEEstSE _cons3.490.143.750.17 Age7.700.247.810.25 Age^2-1.660.09-1.660.09 Girl-0.540.21 Girl*Age-0.230.17 Random Tau_110.640.130.590.13 Tau_220.5009.090.500.09 Rho_210.270.330.190.34 Sigma0.580.050.570.05
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.