crash with no error message

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
patriciotroncoso
Posts: 9
Joined: Wed Nov 21, 2012 12:24 pm

crash with no error message

Post by patriciotroncoso »

Dear all

I've been having a problem with crashes both in MLwiN and runmlwin. I'll try to describe the problem the best that I can, but I haven't even got error messages from MLwiN or runmlwin, both just crashed.

The syntax for the variance component model is the following:

runmlwin math2 cons, level4(localid2: cons) level3(sid2: cons) level2(cid2: cons) level1(pid2: cons) nopause

This runs well in my full dataset with 200,000 observations, but when I added gender to the model, the crashes began to happen. Gender is coded with 0 and 1, there are approximately 3,000 missing values.

The syntax that produces the crashes is the following:

runmlwin math2 cons gender, level4(localid2: cons) level3(sid2: cons) level2(cid2: cons) level1(pid2: cons) nopause

On the other hand, this produces no problems:

runmlwin math2 cons math1, level4(localid2: cons) level3(sid2: cons) level2(cid2: cons) level1(pid2: cons) nopause

Curiously enough, Stata's xtmixed has no problems, this is the syntax:

xtmixed math2 math1 gender || localid2: || sid2: || cid2:, mle variance nostderr

I thought that perhaps there was something wrong with my dataset, so I took two random samples of 10% and 5%. The problem now is with the sample datasets, where I get crashes when specifying the variance component model with 4 levels. I tested the problem reducing the number of levels, the syntax that produces no problems is this:

runmlwin math2 cons, level3(localid2: cons) level2(sid2: cons) level1(pid2: cons) nopause

If I added gender in the model, MLwiN crashes again, except when I use MCMC estimation, but using as initial values those estimated by the previous syntax, so I use the following:

runmlwin math2 cons gender, level3(localid2: cons) level2(sid2: cons) level1(pid2: cons) nopause mcmc(burnin(500) chain(20000) thinning(1)) initsprevious

Is it adequate to use as initial values those estimated from a model that doesn't include the variable that I'm adding?

In sum, what do you think could be the problem with the variable gender?

Thanks in advance to anyone who can help!
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: crash with no error message

Post by GeorgeLeckie »

Sounds odd.

You mention missing data. Does whether MLwiN crash perhaps hinge on that? Try

Code: Select all

drop if gender==.
runmlwin math2 cons gender, level4(localid2: cons) level3(sid2: cons) level2(cid2: cons) level1(pid2: cons) nopause

Alternatively, does MLwiN crash if you build your model up sequentially (perhaps also listwise deleting the missing cases first)?

Code: Select all

runmlwin math2 cons, level4(localid2: cons) level3(sid2: cons) level2(cid2: cons) level1(pid2: cons) nopause
estimates store model1
runmlwin math2 cons gender, level4(localid2: cons) level3(sid2: cons) level2(cid2: cons) level1(pid2: cons) initsmodel(model1) nopause[/code][/code]


Best wishes

George
patriciotroncoso
Posts: 9
Joined: Wed Nov 21, 2012 12:24 pm

Re: crash with no error message

Post by patriciotroncoso »

Thank you very much, George

I'm sorry for the delayed reply, I was keeping myself busy with other statistical issues.

Dropping the missing cases did solve the crashing problem, thanks!!!

Anyway, I was wondering, is it a valid procedure to simply delete the cases with missing values in the variable gender? How do I justify this? I mean, I do have data for those cases in other relevant variables.

Best wishes!
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: crash with no error message

Post by GeorgeLeckie »

Great,

Listwise deletion is the default missing data procedure in most statistical software packages and this is true for Stata commands and MLwiN (and therefore runmlwin) as well.

However, listwise deletion is always inefficient and may produce biased estimates, particularly if you have a high proportion of missing cases.

You could try imputing the missing values prior to fitting your model by first fitting a multiple imputation model

See the Stata multiple imputation manual for further details.

Best wishes

George
Post Reply