13
Modelling non-independent random effects in multilevel models William Browne Harvey Goldstein University of Bristol

Modelling non-independent random effects in multilevel models William Browne Harvey Goldstein University of Bristol

Embed Size (px)

Citation preview

Page 1: Modelling non-independent random effects in multilevel models William Browne Harvey Goldstein University of Bristol

Modelling non-independent random effects in multilevel models

William Browne

Harvey Goldstein

University of Bristol

Page 2: Modelling non-independent random effects in multilevel models William Browne Harvey Goldstein University of Bristol

A standard multilevel (VC) model

2 2( ) , ~ (0, ), ~ (0, )ij ij j ij ij e j uy X u e e N u N

Fixed Random level 2 level 1 residual

The are assumed independent., j iju e

But this is sometimes unrealistic:

• Repeated measures growth models with closely spaced occasions

• Schools competing for resources in a ‘zero-sum’ environment

Page 3: Modelling non-independent random effects in multilevel models William Browne Harvey Goldstein University of Bristol

Repeated measures growth curves

A simple model of linear growth with random slopes:

0 1

0 0 0

1 1 1

ij j j ij ij

j j

j j

u

u

y t e

A model for (non-independent) level 1 residuals might be written:

)(),Cov( 2, sfee ejsiij

sesf 1)( 0

Leading to an exponential decay function. (Goldstein and Healy 1994)

Page 4: Modelling non-independent random effects in multilevel models William Browne Harvey Goldstein University of Bristol

Schools in competition

2 2( ) , ~ (0, ), ~ (0, )ij ij j ij ij e j uy X u e e N u N

1 2 1 2

1 2

11 2 1 1 2

Define the hyberbolic link function

( ) | |

( 1) /( 1)j j j jf f

j j

f j j z z

e e

where this correlation is inversely proportional to the (resource) distance between the schools .

If we can specify a suitable (set of ) distance functions then we can estimate the relevant parameters.

One possibility is to use the extent of overlap between appropriately defined catchment areas.

Work using the ALSPAC cohort is currently underway.

1 2| |z z

Page 5: Modelling non-independent random effects in multilevel models William Browne Harvey Goldstein University of Bristol

Other link functions

/( 1)jk jkf fjk e e

These have the following forms

Logit:

Log:

jkfjk e

Page 6: Modelling non-independent random effects in multilevel models William Browne Harvey Goldstein University of Bristol

Link functions

Link function f(s). From left to right; hyperbolic, logit, log

Page 7: Modelling non-independent random effects in multilevel models William Browne Harvey Goldstein University of Bristol

Parameters and estimation

We need to estimate the parameters of the correlation function, the variances and the fixed effects.

We propose an MCMC algorithm and have programmed this for general 2- level models where correlations can exist at either or both levels and responses can be normal or binary.

Steps are a mixture of Gibbs and MH sampling with adaptive proposal distributions and suitable diffuse priors

Page 8: Modelling non-independent random effects in multilevel models William Browne Harvey Goldstein University of Bristol

Example 1: Growth data

The data are 9 measurements on 20 boys around age 13, approximately 3 months apart

Fitting a 2-level model with random linear and quadratic coefficients does not remove residual autocorrelation among level 1 residuals.

We model the correlation as a negative exponentially decreasing function of the time difference

We use a log (exponential) link since correlations should be positive

In discrete time (equal intervals) this is a standard first order autoregressive model

We fit a 4-th degree polynomial with and without random linear coefficient

1 2

1 2 1 21 2( ), t tf

t t t tf t t e

Page 9: Modelling non-independent random effects in multilevel models William Browne Harvey Goldstein University of Bristol

Results level 2 covariance

matrix

Intercept age

Intercept 69.4

(21.3)

0.00001 (0.000001)

age 8.82

(3.43)

2.23

(0.83)

level 1 variance

e2 1.13 (0.41) 77.4 (24.2)

(mean) -1.24 (0.65) -0.017 (0.005)

(median + 95%

interval)

-1.02 (-3.09, -0.49)

DIC (PD) 531.1 (40.2) 670.0 (6.4)

random slope Intercept only

For model A the correlation between measurements 0.25 years apart is 0.73 and for model B is 0.996.

Page 10: Modelling non-independent random effects in multilevel models William Browne Harvey Goldstein University of Bristol

An equivalence

For a 2-level variance components model the full covariance matrix among the level 1 units in a level 2 unit can be written in the form

2 2

2 2 2

2 2 2 2

2 2 2 2 2

e u

u e u

u u e u

u u u e u

where in this case there are 4 level 1 units. For the model with an equal correlation structure at level 1 and no level 2 variation the corresponding covariance matrix is equivalent, namely

2*2 2* *

2 2 2* * *

2 2 2 2* * * *

e

e e

e e e

e e e e

2 2 2 2 2* *, e u e u e

Page 11: Modelling non-independent random effects in multilevel models William Browne Harvey Goldstein University of Bristol

A level 2 example: dependence based on distance apart

We have a three level model consisting of schools at level 3, cohorts or year groups at level 2 (2004,2005,2006) and students at level 1. The data are taken from the

PLASC/NPD database response is GCSE score and predictors include 11 year KS test score

We fit as a 2-level model (school cohorts at level 2) with a correlation structure between cohorts within schools and dummies for years :

1 2 1 2

1 2 1 2

3

0 1 , 0 01

2 20 0 0 0

11 1 2 2

~ (0, ), ~ (0, )

| | .1, ( 1) /( 1)h h h h

ij ij h h j j ijh

j u ij e

f f

h h h h

y x c u e

u N e N

f h h e e

So that the correlation is modelled by a constant + decreasing function of time difference

Page 12: Modelling non-independent random effects in multilevel models William Browne Harvey Goldstein University of Bristol

1

2

0.033

0.028 0.033

0.021 0.028 0.033

A two level model for examination data with correlation structure at level 2. Inverse tanh link function. Burn in =500, Sample =5000. Year 1 (2004) chosen as base category. Uniform priors for variances. Second covariance matrix is unretricted estimate.

Parameter Estimate Standard error

Intercept 0.017 0.026

Year 2 -0.041 0.017

Year 3 -0.002 0.018

Pretest 0.719 0.004

2.144 0.612

0.389 0.680

Level 1 variance 0.467 0.004

Level 2 covariance matrix

DIC (PD) 61401.0 (126.4)

RESULTS

Page 13: Modelling non-independent random effects in multilevel models William Browne Harvey Goldstein University of Bristol

Conclusions

These models provide a useful generalisation to standard ‘independence’ models and are readily extended to non-normal responses, cross classifications etc.

They allow us to more realistically describe the behaviour of institutions that are interactive rather than independently behaving units