Page 1 of 1

Error "Unable to invert va" while running MCMC model

Posted: Wed Apr 18, 2018 9:15 pm
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)

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

Posted: Wed Apr 18, 2018 9:47 pm
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?

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

Posted: Thu Apr 19, 2018 12:17 am
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 4732 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.

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

Posted: Thu Apr 19, 2018 10:17 am
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.