I'll be assisting someone setup a multiple membership model and need a little guidance. First, about the data: It's repeated measures of students within schools. Children are nested in one school per year. There are five years of data, which means children can attend a maximum of five schools throughout the study. When creating the multiple membership weights, it appears that at least part of the data has to be in wide format to store those weights.
In setting up what would normally be a three-level model with a year ID, student ID, and school ID, do I simply add in wide format the attendance pattern and store the weights at level 4? It is unclear from the examples in the user's guide and in the practical how to carry out this weight construction for longitudinal data.
Alternatively, should my model be set up as a two-level model with year ID and student ID with only the attendance patterns in wide format?
Thanks,
Diego Torres
HELP setting up multiple membership model
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: HELP setting up multiple membership model
If you haven't already done so I would suggest that you look at module 13 of our on-line training materials (http://www.cmm.bris.ac.uk/lemma/) which covers multiple membership models in detail.
Re: HELP setting up multiple membership model
Dear DrDTorres,
My main concern here is whether your response is 1 per year ? If so then you simply have a simple 3 level model. If you want to do something more complicated then
as I see it you have several choices. You could fit a variant of a cross-classified model which is in fact a 3 level nested model with a separate effect for each school by year nested within effects for school with fixed effects for the years. If you want to assume the same effects for schools across years then you can in theory fit a multiple membership model but this will involve data manipulation as each observation will only be affected by schools already attended.
If instead your response is at the end of schooling then this is more straightforward and I recommend looking at Naess and Leyland's paper which I think was in JRSS Series A.
Regards,
Bill.
My main concern here is whether your response is 1 per year ? If so then you simply have a simple 3 level model. If you want to do something more complicated then
as I see it you have several choices. You could fit a variant of a cross-classified model which is in fact a 3 level nested model with a separate effect for each school by year nested within effects for school with fixed effects for the years. If you want to assume the same effects for schools across years then you can in theory fit a multiple membership model but this will involve data manipulation as each observation will only be affected by schools already attended.
If instead your response is at the end of schooling then this is more straightforward and I recommend looking at Naess and Leyland's paper which I think was in JRSS Series A.
Regards,
Bill.
-
- Posts: 27
- Joined: Thu May 30, 2013 7:19 pm
Re: HELP setting up multiple membership model
Thanks, gentlemen,
I think I get that I should set up my model as a three-level model since I have repeated measures of students nested within schools. Given that my data is longitudinal, however, and given that I should only have one line per individual, i.e., the data must be in wide format, I'm concerned that I won't be able to enter those time-varying predictors in my model. Do you understand what I'm saying? The module doesn't really address how to set up the longitudinal multiple membership model.
I have several time-varying level-one predictors in addition to YEAR.
In answer to your question, Bill, I only have one outcome/response per year, but students can only be in one school within a given year.
Confused,
Diego
I think I get that I should set up my model as a three-level model since I have repeated measures of students nested within schools. Given that my data is longitudinal, however, and given that I should only have one line per individual, i.e., the data must be in wide format, I'm concerned that I won't be able to enter those time-varying predictors in my model. Do you understand what I'm saying? The module doesn't really address how to set up the longitudinal multiple membership model.
I have several time-varying level-one predictors in addition to YEAR.
In answer to your question, Bill, I only have one outcome/response per year, but students can only be in one school within a given year.
Confused,
Diego
Re: HELP setting up multiple membership model
Hi Diego,
I think you are best transforming your data into long format and fitting a cross-classified model with exam score nested within pupil and school. That way you can easily include time varying covariates as you have 1 response per year. The alternative/extension where you make the school classification multiple membership is complicated as only earlier schools should impact on a response
E.G. Pupil Year School Resp Pred1 Pred2
1 1 1 10 6 5
1 2 1 13 7 5
1 3 2 15 9 5
1 4 2 14 8 5
1 5 2 18 10 5
2 1 1 9 4 2 ....
Here we could fit years nested in pupil x school or if you wanted to take account previous school the dataset would be as long but with extra columns thus
E.G. Pupil Year School1 School2 .. Wt1 Wt2 .. Resp Pred1 Pred2
1 1 1 0 1 0 10 6 5
1 2 1 0 1 0 13 7 5
1 3 2 1 0.33 0.67 15 9 5
1 4 2 1 0.5 0.5 14 8 5
1 5 2 1 0.6 0.4 18 10 5
2 1 1 0 1 0 9 4 2 ....
So in years 3-5 due to change of school pupil 1s performance is influenced by 2 schools. The weight for the new school increases as they spend longer in the new school. Note that this is just one possible weighting scheme and you might want to weight current school higher etc.
Hope this helps,
Bill.
I think you are best transforming your data into long format and fitting a cross-classified model with exam score nested within pupil and school. That way you can easily include time varying covariates as you have 1 response per year. The alternative/extension where you make the school classification multiple membership is complicated as only earlier schools should impact on a response
E.G. Pupil Year School Resp Pred1 Pred2
1 1 1 10 6 5
1 2 1 13 7 5
1 3 2 15 9 5
1 4 2 14 8 5
1 5 2 18 10 5
2 1 1 9 4 2 ....
Here we could fit years nested in pupil x school or if you wanted to take account previous school the dataset would be as long but with extra columns thus
E.G. Pupil Year School1 School2 .. Wt1 Wt2 .. Resp Pred1 Pred2
1 1 1 0 1 0 10 6 5
1 2 1 0 1 0 13 7 5
1 3 2 1 0.33 0.67 15 9 5
1 4 2 1 0.5 0.5 14 8 5
1 5 2 1 0.6 0.4 18 10 5
2 1 1 0 1 0 9 4 2 ....
So in years 3-5 due to change of school pupil 1s performance is influenced by 2 schools. The weight for the new school increases as they spend longer in the new school. Note that this is just one possible weighting scheme and you might want to weight current school higher etc.
Hope this helps,
Bill.