Download presentation

Presentation is loading. Please wait.

Published byJeremiah Andrews Modified over 2 years ago

1
1 Random Effects Models for Panel Data Peter W. F. Smith University of Southampton

2
2 Overview Regression for longitudinal data Random intercept models Estimation Gender role attitudes example Random slope (coefficient) models

3
3 Regression for longitudinal data For repeated measure data y ij i = 1,…, m j = 1,…, n i consider the model Example y ij = gender role score for subject i, j = 1,…, 4 x ij = years since 1991, i.e., x i1 = 0, x i2 = 2, x i3 = 4, x i4 = 6

4
4 Regression for longitudinal data (cont) If we can assume ε ij has mean zero and independent for different i or j, then we can use standard methods to fit the model Problem: Unlikely that ε ij is independent of ε ik for j k

5
5 Regression for longitudinal data (cont) If we include more covariates into the model: Then ε ij may be more like random shocks and independence assumption may be more plausible However, still likely to be unmeasured individual factors which lead to a positive correlation between ε ij and ε ik for j k

6
6 Random intercept models To address problem, consider alternative model where u i is the subject-specific residual and represents unmeasured individual factors which affect y

7
7 Random intercept models (cont) Fixed effects model - assume the u i are fixed Random effects model - assume the u i are random with –zero mean –Var( u i ) = σ u 2 –Cor( u i, ε ij ) = 0 If Var( ε ij ) = σ ε 2 then Var( y ij ) = σ u 2 + σ ε 2

8
8 Estimation For standard regression models, we can use ordinary least squares (OLS) methods for estimation However, random effects models require more sophisticated methods such as –maximum likelihood estimation (MLE) –generalised least square (GLS) –restricted maximum likelihood (REML) estimation

9
9 Gender role attitudes example First consider time as a factor: where the dummy variables x ij 2 = 1 if j = 2, i.e., the observation was taken in otherwise x ij3 = 1 if j = 3, i.e., the observation was taken in otherwise x ij4 = 1 if j = 4, i.e., the observation was taken in otherwise

10
10 Gender role attitudes example (cont ) Random-effects ML regression Number of obs = 5716 Group variable (i): pid Number of groups = 1429 Random effects u_i ~ Gaussian Obs per group: min = 4 avg = 4.0 max = 4 LR chi2(3) = Log likelihood = Prob > chi2 = score | Coef. Std. Err. z P>|z| [95% Conf. Interval] _Iyear_93 | _Iyear_95 | _Iyear_97 | _cons | /sigma_u | /sigma_e | rho | Likelihood-ratio test of sigma_u=0: chibar2(01)= Prob>=chibar2 = 0.000

11
11 Gender role attitudes example (cont ) Score decreases with time so consider time as a continuous variable and no other covariates: where x ij = years since 1991 Also try including time-squared in the model

12
12 Gender role attitudes example (cont ) Random-effects ML regression Number of obs = 5716 Group variable (i): pid Number of groups = 1429 Random effects u_i ~ Gaussian Obs per group: min = 4 avg = 4.0 max = 4 LR chi2(1) = Log likelihood = Prob > chi2 = score | Coef. Std. Err. z P>|z| [95% Conf. Interval] time | _cons | /sigma_u | /sigma_e | rho | Likelihood-ratio test of sigma_u=0: chibar2(01)= Prob>=chibar2 = 0.000

13
13 Gender role attitudes example (cont ) Random-effects ML regression Number of obs = 5716 Group variable (i): pid Number of groups = 1429 Random effects u_i ~ Gaussian Obs per group: min = 4 avg = 4.0 max = 4 LR chi2(2) = Log likelihood = Prob > chi2 = score | Coef. Std. Err. z P>|z| [95% Conf. Interval] time | timesq | _cons | /sigma_u | /sigma_e | rho | Likelihood-ratio test of sigma_u=0: chibar2(01)= Prob>=chibar2 = 0.000

14
14 Gender role attitudes example (cont ) Since timesq is not significant we remove it and add the other covariates: –Age –Sex –Educational attainment –Whether mother worked when subject was age 14 –Economic activity at time t (time varying)

15
15 Gender role attitudes example (cont ) LR chi2(10) = Log likelihood = Prob > chi2 = score | Coef. Std. Err. z P>|z| [95% Conf. Interval] asex | _Iaagecat_2 | _Iaagecat_3 | _Iaagecat_4 | aeduc | amumwk | _Iecact_2 | _Iecact_3 | _Iecact_4 | time | _cons | /sigma_u | /sigma_e | rho | Likelihood-ratio test of sigma_u=0: chibar2(01)= Prob>=chibar2 = 0.000

16
16 Gender role attitudes example (cont ) All covariates are significant Higher scores, on average, across the waves if: –younger –woman –more educated –mother worked –full-time worker Lower scores if family carer To assess changes with time interact covariates with time

17
17 Gender role attitudes example (cont ) LR chi2(19) = Log likelihood = Prob > chi2 = score | Coef. Std. Err. z P>|z| [95% Conf. Interval] _Iasex_2 | time | _IaseXtime_2 | _Iaagecat_2 | _Iaagecat_3 | _Iaagecat_4 | _IaagXtime_2 | _IaagXtime_3 | _IaagXtime_4 | _Iaeduc_1 | _IaedXtime_1 | _Iamumwk_1 | _IamuXtime_1 |

18
18 Gender role attitudes example (cont ) _Iecact_2 | _Iecact_3 | _Iecact_4 | _IecaXtime_2 | _IecaXtime_3 | _IecaXtime_4 | _cons | /sigma_u | /sigma_e | rho | Likelihood-ratio test of sigma_u=0: chibar2(01)= Prob>=chibar2 = p-values for coefficients for interactions of time with age and economic activity suggest these are non-significant and a likelihood-ratio test confirms this, so remove them

19
19 Gender role attitudes example (cont ) Log likelihood = Prob > chi2 = score | Coef. Std. Err. z P>|z| [95% Conf. Interval] _Iasex_2 | time | _IaseXtime_2 | _Iaagecat_2 | _Iaagecat_3 | _Iaagecat_4 | _Iaeduc_1 | _IaedXtime_1 | _Iamumwk_1 | _IamuXtime_1 | _Iecact_2 | _Iecact_3 | _Iecact_4 | _cons | /sigma_u | /sigma_e | rho | Likelihood-ratio test of sigma_u=0: chibar2(01)= Prob>=chibar2 = 0.000

20
20 Gender role attitudes example (cont ) Conclusions Initially, higher scores if: –younger –woman –more educated –mother worked –full-time worker Scores decrease, compared to baseline mens scores, if: –woman –more educated –mother worked

21
21 Gender role attitudes example (cont ) Between, σ u 2, and within, σ e 2, subject variation similar Intra-class correlation or within-subject correlation: –estimated to be 0.59 –proportion of total variation between subjects –exchangeable structure imposed

22
22 Random slope (coefficient) models We can allow the coefficients to be random: where β i is a vector of subject-specific random coefficients with mean β u i is a subject-specific random intercept with mean zero b i is a subject-specific random deviation from mean coefficient No longer imposes exchangeable correlation structure

23
23 Random slope (coefficient) models (cont) Example: random slope model where y ij = gender role score for subject i, j = 1,…, 4 x ij = years since 1991, i.e., x i1 = 0, x i2 = 2, x i3 = 4, x i4 = 6 β 1 = mean slope b i = subject-specific random deviation from mean slope u i = subject-specific random intercept

24
24 Gender role attitudes example (cont ) Mixed-effects ML regression Number of obs = 5716 Group variable: pid Number of groups = 1429 Obs per group: min = 4 avg = 4.0 max = 4 Wald chi2(1) = Log likelihood = Prob > chi2 = score | Coef. Std. Err. z P>|z| [95% Conf. Interval] time | _cons | Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] pid: Unstructured | sd(time) | sd(_cons) | corr(time,_cons) | sd(Residual) | LR test vs. linear regression: chi2(3) = Prob > chi2 = Note: LR test is conservative and provided only for reference

25
25 Gender role attitudes example (cont ) Log likelihood = Prob > chi2 = score | Coef. Std. Err. z P>|z| [95% Conf. Interval] _Iasex_2 | time | _IaseXtime_2 | _Iaagecat_2 | _Iaagecat_3 | _Iaagecat_4 | _Iaeduc_1 | _IaedXtime_1 | _Iamumwk_1 | _IamuXtime_1 | _Iecact_2 | _Iecact_3 | _Iecact_4 | _cons |

26
26 Gender role attitudes example (cont ) Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] pid: Unstructured | sd(time) | sd(_cons) | corr(time,_cons) | sd(Residual) | LR test vs. linear regression: chi2(3) = Prob > chi2 = Note: LR test is conservative and provided only for reference

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google