lecture 21 cross-classified and multiple membership models

23
Lecture 21 Cross-classified and Multiple membership models

Upload: natalie-harding

Post on 28-Mar-2015

243 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Lecture 21 Cross-classified and Multiple membership models

Lecture 21

Cross-classified and Multiple membership models

Page 2: Lecture 21 Cross-classified and Multiple membership models

Lecture Contents

• Cross classified models

• AI example

• Multiple membership models

• Danish chickens example

• More complex structures

• ALSPAC educational example

Thanks to Jon Rasbash for slides!

Page 3: Lecture 21 Cross-classified and Multiple membership models

Cross-classificationFor example, hospitals by neighbourhoods. Hospitals will draw patients from many different neighbourhoods and the inhabitants of a neighbourhood will go to many hospitals. No pure hierarchy can be found and patients are said to be contained within a cross-classification of hospitals by neighbourhoods :

 

nbhd 1 nbhd 2 Nbhd 3

hospital 1 xx x

hospital 2 x x

hospital 3 xx x

hospital 4 x xxx

Hospital H1 H2 H3 H4

Patient P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12

Nbhd N1 N2 N3

Page 4: Lecture 21 Cross-classified and Multiple membership models

Other examples of cross-classifications

• pupils within primary schools by secondary schools.

• patients within GPs by hospitals.

• interviewees within interviewers by surveys.

• repeated measures within raters by individual. (e.g. patients by nurses)

Page 5: Lecture 21 Cross-classified and Multiple membership models

Notation

With hierarchical models we use a subscript notation that has one subscript per level and nesting is implied reading from the left. For example, subscript pattern ijk denotes the i’th level 1 unit within the j’th level 2 unit within the k’th level 3 unit.

If models become cross-classified we use the term classification instead of level. With notation that has one subscript per classification, that captures the relationship between classifications, notation can become very cumbersome. We propose an alternative notation introduced in Browne et al. (2001) that only has a single subscript no matter how many classifications are in the model.

Page 6: Lecture 21 Cross-classified and Multiple membership models

Single subscript notationHospital H1 H2 H3 H4

Patient P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12

Nbhd N1 N2 N3

i nbhd(i) hosp(i)1 1 12 2 13 1 14 2 25 1 26 2 27 2 38 3 39 3 410 2 411 3 412 3 4

)1()3()(

)2()(0 iihospinbhdi euuy

We write the model as

1)3(

4)2(

3011

1)3(

1)2(

101

euuy

euuy

Where classification 2 is neighbourhood and classification 3 is hospital. Classification 1 always corresponds to the classification at which the response measurements are made, in this case patients. For patients 1 and 11 equation (1) becomes:

Page 7: Lecture 21 Cross-classified and Multiple membership models

Classification diagrams

Hospital

Patient

Neighbourhood

Hospital

Patient

Neighbourhood

Nested structure where hospitals are contained within neighbourhoods

Cross-classified structure where patients from a hospital come from many neighbourhoods and people from a neighbourhood attend several hospitals.

In the single subscript notation we lose information about the relationship(crossed or nested) between classifications. A useful way of conveying this information is with the classification diagram. Which has one node per classification and nodes linked by arrows have a nested relationship and unlinked nodes have a crossed relationship.

Page 8: Lecture 21 Cross-classified and Multiple membership models

Example : Artificial insemination by donor

Women w1 w2 w3 Cycles c1 c2 c3 c4… c1 c2 c3 c4… c1 c2 c3 c4… Donations d1 d2 d1 d2 d3 d1 d2 Donors m1 m2 m3

1901 women279 donors 1328 donations12100 ovulatory cyclesresponse is whether conception occurs in a given cycle

In terms of a unit diagram:

Donor

Woman

Cycle

Donation

Or a classification diagram:

Page 9: Lecture 21 Cross-classified and Multiple membership models

Model for artificial insemination data

),0(~

),0(~

),0(~

)()logit(

),1(~

2)4(

)4()(

2)3(

)3()(

2)2(

)2()(

)4()(

)3()(

)2()(i

uidonor

uidonation

uiwoman

idonoridonationiwomani

ii

Nu

Nu

Nu

uuuX

Binomialy

We can write the model as

2)4(u

0

1

2

3

4

5

6

7

2)2(u

2)3(u

Parameter Description Estimate(se)

intercept -4.04(2.30)

azoospermia * 0.22(0.11)

semen quality 0.19(0.03)

womens age>35 -0.30(0.14)

sperm count 0.20(0.07)

sperm motility 0.02(0.06)

insemination to early -0.72(0.19)

insemination to late -0.27(0.10)

women variance 1.02(0.21)

donation variance 0.644(0.21)

donor variance 0.338(0.07)

Results:

Page 10: Lecture 21 Cross-classified and Multiple membership models

Multiple membership models

 

When level 1 units are members of more than one higher level unit we describe a model for such data as a multiple membership model.

For example,

•  Pupils change schools/classes and each school/class has an effect on pupil outcomes.

• Patients are seen by more than one nurse during the course of their treatment.

Page 11: Lecture 21 Cross-classified and Multiple membership models

Notation

),0(~

)1(),0(~

)(

2

2)2(

)2(

)(

)2()2(,

ei

uj

inursejijjiii

Ne

Nu

euwXBy

Note that nurse(i) now indexes the set of nurses that treat patient i and w(2)

i,j is a weighting factor relating patient i to nurse j. For example, with four patients and three nurses, we may have the following weights:

  n1(j=1) n2(j=2) n3(j=3)

p1(i=1) 0.5 0 0.5

p2(i=2) 1 0 0

p3(i=3) 0 0.5 0.5

p4(i=4) 0.5 0.5 0

i

i

i

i

euuXBy

euuXBy

euXBy

euuXBy

)2(2

)2(14

)2(3

)2(23

)2(12

)2(3

)2(11

5.05.0

5.05.0

1

5.05.0

Here patient 1 was seen by nurse 1 and 3 but not nurse 2 and so on. If we substitute the values of w(2)

i,j , i and j. from the table into (1) we get the series of equations :

Page 12: Lecture 21 Cross-classified and Multiple membership models

Classification diagrams for multiple membership relationships

Double arrows indicate a multiple membership relationship between classifications.

patient

nurseWe can mix multiple membership, crossed and hierarchical structures in a single model.

patient

nurse

hospital

GP practice

Here patients are multiple members of nurses, nurses are nested within hospitals and GP

practice is crossed with both nurse and hospital.

Page 13: Lecture 21 Cross-classified and Multiple membership models

Example involving nesting, crossing and multiple membership – Danish chickens

Production hierarchy10,127 child flocks 725 houses 304 farms

Breeding hierarchy10,127 child flocks200 parent flocks

farm f1 f2… Houses h1 h2 h1 h2 Child flocks c1 c2 c3… c1 c2 c3…. c1 c2 c3…. c1 c2 c3…. Parent flock p1 p2 p3 p4 p5….

Child flock

House

Farm

Parent flock

As a unit diagram: As a classification diagram:

Page 14: Lecture 21 Cross-classified and Multiple membership models

Model and results

),0(~

),0(~),0(~

)()logit(

),1(~

2)4(

)4()(

2)3(

)3()(

2)2(

)2(

)(.

)4()(

)3()(

)2()2(,i

uifarm

uihouseuj

iflockpjiifarmihousejjii

ii

Nu

NuNu

euuuwXB

Binomialy

0

1

2

3

4

5

2)2(u

2)3(u

2)4(u

Parameter Description Estimate(se)

intercept -2.322(0.213)

1996 -1.239(0.162)

1997 -1.165(0.187)

hatchery 2 -1.733(0.255)

hatchery 3 -0.211(0.252)

hatchery 4 -1.062(0.388)

parent flock variance 0.895(0.179)

house variance 0.208(0.108)

farm variance 0.927(0.197)

Results:

Page 15: Lecture 21 Cross-classified and Multiple membership models

All the children born in the Avon area in 1990 followed up longitudinally.

Many measurements made including educational attainment measures.

Children span 3 school year cohorts(say 1994,1995,1996).

Suppose we wish to model development of numeracy over the schooling period. We may have the following attainment measures on a child :

m1 m2 m3 m4 m5 m6 m7 m8

primary school secondary school

ALSPAC data

Page 16: Lecture 21 Cross-classified and Multiple membership models

•Measurement occasions within pupils.

M. Occasion

Pupil P. Teacher

•At each occasion there may be a different teacher.

P School Cohort

•Pupils are nested within primary school cohorts.

Primary school

Area

•All this structure is nested within primary school.• Pupils are nested within residential areas.

Structure for primary schools

Page 17: Lecture 21 Cross-classified and Multiple membership models

M. occasions

Pupil P. Teacher

P School Cohort

Primary school

Area

Nodes directly connected by a single arrow are nested, otherwise nodes are cross-classified. For example, measurement occasions are nested within pupils. However, cohort are cross-classified with primary teachers, that is teachers teach more than one cohort and a cohort is taught by more than one teacher.

T1 T2 T3

Cohort 1 95 96 97

Cohort 2 96 97 98

Cohort 3 98 99 00

A mixture of nested and crossed relationships

Page 18: Lecture 21 Cross-classified and Multiple membership models

It is reasonable to suppose the attainment of a child in a particualr year is influenced not only by the current teacher, but also by teachers in previous years. That is measurements occasions are “multiple members” of teachers.

m1 m2 m3 m4

t1 t2 t3 t4

M. occasions

Pupil P. Teacher

P School Cohort

Primary school

AreaWe represent this in the classification diagram by using a double arrow.

Multiple membership

Page 19: Lecture 21 Cross-classified and Multiple membership models

If pupils move area, then pupils are no longer nested within areas. Pupils and areas are cross-classified. Also it is reasonable to suppose that pupils measured attainments are effected by the areas they have previously lived in. So measurement occasions are multiple members of areas.

M. occasions

Pupil

P. TeacherP School Cohort

Primary school

Area

M. occasions

Pupil

P. TeacherP School Cohort

Primary school

Area

Classification diagram without pupils moving residential areas.

Classification diagram where pupils move between residential areas.

BUT…

What happens if pupils move area?

Page 20: Lecture 21 Cross-classified and Multiple membership models

Classification diagram where pupils move between areas but not schools.

If pupils move schools they are no longer nested within primary school or primary school cohort. Also we can expect, for the mobile pupils, both their previous and current cohort and school to effect measured attainments.

M. occasions

Pupil

P. TeacherP School Cohort

Primary school

Area

M. occasions

Pupil P. TeacherP School Cohort

Primary school

Area

Classification diagram where pupils move between schools and areas.

If pupils move area they will also move schools

Page 21: Lecture 21 Cross-classified and Multiple membership models

And secondary schools…

M. occasions

Pupil P. TeacherP School Cohort

Primary school

Area

We could also extend the above model to take account of Secondary school, secondary school cohort and secondary school teachers.

If pupils move area they will also move schools cnt’d

Page 22: Lecture 21 Cross-classified and Multiple membership models

Remember we are partitioning the variability in attainment over time between primary school, residential area, pupil, p. school cohort, teacher and occasion. We also have predictor variables for these classifications, eg pupil social class, teacher training, school budget and so on. We can introduce these predictor variables to see to what extent they explain the partitioned variability.

Other predictor variables

Page 23: Lecture 21 Cross-classified and Multiple membership models

Information for the practicals

• We have two MLwiN practicals taken from chapters of Browne (2003).

We firstly look at a cross-classified model for education data (primary schools and secondary schools.

We secondly look at a multiple membership model for a (simulated) earnings dataset.