I am new to MLwiN and have been trying to run a cross-classified model with 3 levels: children, schools and neighbourhoods. I have data from all UK countries, but the data is sparse and in Stata, the model would only run for one of them (Wales) where the number of observations per group is highest: here sample size is 1714, number of schools is 522 (average number of obs. per group = 3.3) and number of neighbourhoods is 268 (average obs = 6.4). The model seems to run fine via runmlwin but the estimates are very different from what I got with Stata. For the other countries, the models do not run at all in Stata, and in MLwiN I get unrealistic results for the higher level variances, i.e. they are too small.
I have three questions:
1. Is there a rule of thumb as to the minimum of observations per group necessary?
2. For a cross-classified model, does the order in which the higher levels are specified matter?
3. Can I trust that the estimates given by MLwiN for Wales are correct?
This is the code:
The outcome is reading, msoa4all is the neighbourhood identifier and s4schoolid the school identifier. The starting values I have used are close to what I got from the Stata model.
Stata:
Code: Select all
xi: xtmixed s4read || _all: R.msoa4all || s4schoolid: ,mle var
MLwiN:
Code: Select all
sort msoa4all s4schoolid mcsid
matrix b= (100, 20, 20, 300)
runmlwin s4read cons , level3 (msoa4all:cons) level2(s4schoolid: cons) level1(mcsid: cons) mcmc (cc) initsb (b)
Anja