I am trying to run two level logistic regression models in MLwiN on a dataset which merges data from two different years of interest (2001 and 2011). Level 1 is individuals and Level 2 is Local Authority Districts (LADs). The dataset has individual level variables (survey responses, age, gender, ethnic group etc) and LAD level variables (LAD deprivation, LAD population density etc). I have separately modelled the datasets for 2001 and 2011 and have the results for this. Now I have merged the datasets and want to look at whether the interaction between YEAR (as a variable in the merged dataset) and the main predictor variable of interest (LAD ethnic diversity) has a significant effect on the outcome variable. The problem is that in the merged dataset, each LAD-level variable now has two values (one for 2001 and one for 2011) and MLwiN is now treating these variables as individual-level rather than area-level. So I am looking for help with the following:
Is it possible to carry out multi-level modelling in MLwiN when the higher-level variables have varied values within each higher level unit?
Is there a way to make MLwiN treat the higher level variables as level 2 (i.e. as j rather than ij, which is what is happening now)?
I would be very grateful for any advice or information about this. Thank you. Liz
Dealing with varied values within higher level units
-
- Posts: 1
- Joined: Tue Sep 02, 2014 4:11 pm
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Dealing with varied values within higher level units
Professor Kelvyn Jones has asked me to pass on the following:
The model should look like
Response is a function of Intercept + YearDummy + LADEthnic + YearDummy*LADEthnic + Other variables. + Random Intercept for LAD
The interaction is a cross level interaction and both it and the LADEthnic variable will have a ij subscript – there is nothing wrong with this. The standard error for both these variables will be more correctly estimated (than a single level model would be) due to the inclusion of the random intercept at the LAD level for any unexplained variation at that level. So there is no problem with your formulation. The j subscript is just a display thing - it does not affect the estimation of the model – it is the random intercept term that is important.
If you want to know more about contextual effects and their display via customised predictions in MLwiN; have a look at “Contextual variables at level two” at http://www.bristol.ac.uk/cmm/software/m ... urces.html