Error cross-classified multinomial

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
ninaschum
Posts: 2
Joined: Thu Apr 05, 2018 9:47 am

Error cross-classified multinomial

Post by ninaschum »

Hello,

I am trying to estimate a multinomial cross-classified model with three levels and three answer categories. The IGLS model works just fine, but I get an error message when adding "mcmc(cc)":

error while obeying batch file
... at line number 541:
WSET

Unable to invert va.

This is the model to get the starting values (which works):

Code: Select all

sort id intid recnr
runmlwin missings_Eink_3 cons second_int  ///
			wave2 wave3 wave4 wave5 wave6 wave7 ///
			move_dist, ///
    level3(id: cons) ///
    level2(intid: cons) ///
    level1(recnr:) ///
	discrete(dist(multinomial) link(mlogit) denom(cons) basecategory(3)) ///
	nopause   
This is the mcmc model (which does not work):

Code: Select all

sort id intid recnr 
runmlwin missings_Eink_3 cons second_int  ///
			wave2 wave3 wave4 wave5 wave6 wave7 ///
			move_dist, ///
    level3(id: cons) ///
    level2(intid: cons) ///
    level1(recnr:) ///
	discrete(dist(multinomial) link(mlogit) denom(cons) basecategory(3)) ///
	mcmc(cc) nopause   initsprevious 	
I'm happy to get any advice!

By the way, thank you for this very helpful forum and all the materials you provide!

Kind regards,
Nina
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: Error cross-classified multinomial

Post by ChrisCharlton »

Does the hierarchical version of the MCMC model work for you? If so then it may be worth checking the identifiers to make sure that they make sense for a cross-classified model, as well as trying simpler models to see whether they are able to be fit.
ninaschum
Posts: 2
Joined: Thu Apr 05, 2018 9:47 am

Re: Error cross-classified multinomial

Post by ninaschum »

Thank you very much, Chris, for your reply!

The 3-level hierarchical level with MCMC (without CC) does not work either (same error message).

However, if I leave out one level (interviewer) it works (MCMC, without and even with CC).

So, maybe I just need to simplify my model?
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: Error cross-classified multinomial

Post by ChrisCharlton »

Without seeing the data I cannot really say exactly what is going on. The error indicates that there is a problem inverting the co-variance (Omega) matrix at one of the levels (most likely because it is not positive-definite). This could be due to a problem with the data, or possibly the starting values that you are using. The MLwiN IGLS values will often be bad for cross-classified models as they are based on a different data structure. You can test whether the matrices used as starting values can be inverted by using Stata functions such as cholesky() or invsym() (see https://www.stata.com/help.cgi?matrix+functions) and checking whether they give error messages. If so then you may need to provide your own starting values. If there aren't any problems with the starting values then it is likely that something in your data is causing the algorithm to fail at a later point.
Post Reply