system missing in cross-classified models
Posted: Mon Feb 12, 2024 1:03 pm
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
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