Page 1 of 1

How to check hierarchy in complex cross-clasified structure

Posted: Tue Jan 23, 2018 1:41 pm
by GerineLodder
I have a dataset with the following levels:

School (99 schools)
Class * (see below)
ID (4249 children)
Time (3 timepoints, T1, T2, T3)

For Class, there is cross-nesting going on:
At T1, children were in their classT1 (N=250), At T2 and T3, children were in classT2 (N=232).

To be precise, we measured T1 in May, and both T2 and T3 were measured in the next schoolyear (October and May, respectively).
Classroom composition could change from T1 to T2, but because T2 and T3 were measured within the same school year, classroom composition was similar there.

I now defined this cross-classified structure as follow:

Code: Select all

 formula1 = outcome ~1 + (1|school) + (1|classT2) + (1|classT1) + (1|ID) + (1|Time)
My question is: can RMLwin tell that:
time is nested in ID,
ID is nested in both classT2 and classT1,
both classT2 and classT1 are nested in school ?

And, how can I chech that this hierarchy / clustering was recognized as it should?

Re: How to check hierarchy in complex cross-clasified structure

Posted: Wed Jan 24, 2018 1:47 pm
by billb
Hi Gerine,
If you are using MCMC for your cross-classified model then the software doesn't need to know nestings as nested classifications are just a special case of the more general crossed classification. The only thing you have to be careful of is with regard how you label your units so things will go wrong for example if you reused in your example ID for different schools i.e. you might have a pupil 1 in school 1 and pupil 1 in school 2. If you choose cross-classification it would think these were the same pupil so ensure you have unique IDs.
Hope that helps,
Bill.

Re: How to check hierarchy in complex cross-clasified structure

Posted: Wed Jan 24, 2018 1:59 pm
by GerineLodder
That does help, thank you.

Just to be clear, the nesting of classrooms within schools, and nesting of ID in both classT1 and classT2, will be automatically recognized?

Re: How to check hierarchy in complex cross-clasified structure

Posted: Wed Jan 24, 2018 2:06 pm
by billb
Hi Gesine,
The point is that they don't need to be recognized for the model to fit correctly - again you should have unique IDs so don't have classT1 = 1 in school 1 and classT1 = 1 in school 2 or they'll be treated as the same class. The MCMC algorithm unlike the IGLS algorithm doesn't rely on nestings to make it run.
Bill.