system missing in cross-classified models

Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
Post Reply
rachel3897
Posts: 1
Joined: Mon Feb 12, 2024 12:04 pm

system missing in cross-classified models

Post by rachel3897 »

Hello,

I'm running cross-classified models using the 'runmlwin' command. My outcome variable is continuous and the predictor variable of interest is binary (IMD_25 coded 0/1).

All was going well until I noticed I'd made a silly error in my stata code to dichotomise the predictor variable (NB there's good logic for dichotomising this, I do use the full continuous scale in a sensitivity analysis too)... I had accidentally not retained the system missing values (N=3,324) as missing, they'd become coded as '0' instead. I corrected this and re-ran my cross-classified models expecting the N to change as well as the model results ....but everything stayed EXACTLY the same as before.

I've checked multiple times and I have definitely corrected the mistake, the predictor variable has been 'updated' to include the missing values but I don't understand why the models don't change - surely they should do as stata treats 'zero' and 'system missing' differently so I assume 'runmlwin' doesn't do anything odd?

Any thoughts on what might be going on here would be much appreciated as I'm struggling to understand it
Thank you very much

---------
For info:

*Ns for predictor variable 'IMD_25'
Coded 0: N =11,584
Coded 1: N = 4,323
System missing: N = 3,324


The code for my cross-classified model looks like this, in case helpful to see:
*Unadjusted model

cons=1
matrix b_1 = (0, 0, .33, .33, .33, .33, .33, .33, .33) //start values for unadjusted model

xi: runmlwin GEBTOT_C cons i.IMD_25, level 7(neighbourhood_w1: cons) level6(neighbourhood_w2: cons) level5(neighbourhood_w3: cons) level4(neighbourhood_w4: cons) level3(neighbourhood_w5: cons) level2(neighbourhood_w6: cons) level1(ID: cons) mcmc(cc)initsb(b_1) nopause
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: system missing in cross-classified models

Post by ChrisCharlton »

Which version of MLwiN were you using to run these model?

MLwiN should treat zero as a valid ID (unless you are running a multiple membership model) so I am not sure of the cause for what you are seeing. One thing that you can do is to remove the nopause option from your runmlwin command and then look in either the Model>Equations or the Model>Hierarchy Viewer windows to check that it is displaying the expected number of units for each classification. You could also try dropping the rows containing missing from within Stata and comparing the results to the model that includes them.
eremacaw
Posts: 2
Joined: Tue Mar 05, 2024 7:39 am

Re: system missing in cross-classified models

Post by eremacaw »

It's possible that the effects of your predictor variable are already captured adequately by other variables included in your model.snake game If the predictor variable is not adding significant explanatory power beyond what's already accounted for by other covariates, its inclusion may not substantially alter the model results.
Post Reply