Error "Unable to invert va" while running MCMC model

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
awenterem
Posts: 2
Joined: Wed Apr 18, 2018 8:56 pm

Error "Unable to invert va" while running MCMC model

Post by awenterem »

Hi all,

I am quite new to multilevel regression modelling. I am trying to run a random coefficient using the MCMC method with the code below.
I keep getting an error that says "Unable to invert va". I have tried all the other solutions suggested on this forum with no success.
Any help to fix this problem will immensely be appreciated, thanks in advance.

Code: Select all

runmlwin CookingBin HouseSize FHeadSex UUrban HeadAge R_Under15 R_Female BIncome2 BIncome5 BIncome3 BIncome4 c_polity cons , level2(groups:cons c_polity) level1(hid:) discrete(d(binomial) l(logit) denom(cons) pql2) nopause maxiterations(100)
runmlwin CookingBin HouseSize FHeadSex UUrban HeadAge R_Under15 R_Female BIncome2 BIncome5 BIncome3 BIncome4 c_polity cons , level2(groups:cons c_polity ) level1(hid:) discrete(d(binomial) l(logit) denom(cons)) mcmc(burnin(100) chain(1000)
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: Error "Unable to invert va" while running MCMC model

Post by ChrisCharlton »

What do the results of the IGLS model that you are using as starting value look like? Are any of the parameter estimates zero? Have you tried fitting simpler versions of the model, and if so do these work?
awenterem
Posts: 2
Joined: Wed Apr 18, 2018 8:56 pm

Re: Error "Unable to invert va" while running MCMC model

Post by awenterem »

Hi Chris,

Thank you for responding to my question.
Before I respond to your list of questions, I want to explain what I am trying to model. My data is made up of households nested within countries. With the code I shared initially I trying to model the contextual effect of the variable "c_polity" which a is country-level variable.

What do the results of the IGLS model that you are using as starting value look like? Are any of the parameter estimates zero?
In regards to your 1st and 2nd questions, I have attached the results of IGLS model.
Capture2.PNG
Capture2.PNG (78.88 KiB) Viewed 4719 times
Have you tried fitting simpler versions of the model, and if so do these work?

Yes, I have tried simpler specification with the MCMC and it worked perfectly.
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: Error "Unable to invert va" while running MCMC model

Post by ChrisCharlton »

The immediate cause of the error is the var(c_polity) variable in the MCMC model is being given a starting value of zero, which will mean that the level-2 co-variance matrix is non-invertable. A workaround would be to specify your own starting values and seeing whether the estimation is able to get further. I couldn't tell you whether this problem is due to your data or problems with the IGLS quasi-likelihood estimation. I would suggest trying a range of starting values for the MCMC model to see what effect it has on the model results.
Post Reply