Page 1 of 1

Multinomial: MCMC

Posted: Wed Nov 25, 2015 1:13 pm
by KatrijnDelar
Hi

I want to carry out a multinomial multilevel analysis in MlWin, using the Markov Chain Monte Carlo estimation procedure, but I'm having some difficulties.

When I switch from 1st order MQL to 2nd order PQL, I lose all my cases (while my data contains no missing values).
So, I tried to go straight to MCMC estimations, but then I get the following error:
"Error detected by MLN - MCMC error 0315: Prior variance matrix is not positive definite (MCMC 0 500 1 5.8 50 10 2 2 2 1 1 6).

I found a solution for this error on your website (http://www.bristol.ac.uk/cmm/software/s ... rrors.html).
However, having changed my variance matrix (see in attachment), I still get the same error.
Could anyone help me with this?

Many thanks,
Katrijn

Re: Multinomial: MCMC

Posted: Wed Nov 25, 2015 2:06 pm
by ChrisCharlton
Which version of MLwiN are you using, if it isn't 2.35 could you try with that and see if you get the same bahaviour?

After switching to MCMC could you press the "+" button at the bottom of the equations window to display the Priors, and check that these correspond to the covariances from the IGLS model?

Do you have a lot of variables (over 1000) in your data? If so then it's possible that they are stored in columns that MLwiN is expecting to use and may be confusing it.

Re: Multinomial: MCMC

Posted: Wed Nov 25, 2015 3:31 pm
by KatrijnDelar
Dear Chris,

Thank you for your quick reply!

I'm using version 2.35, so that cannot be the problem...

I do not exactly understand what you mean, but I added a print screen of my priors (I couldn't see all the priors, but I guess they are all equal to 1).

And no, my dataset only contains 20 variables.

Kind regards,
Katrijn

Re: Multinomial: MCMC

Posted: Wed Nov 25, 2015 4:14 pm
by ChrisCharlton
Thanks for the additional information. The Priors I was interesting in seeing were the ones for the covariance matrices (for an example see the screenshot on page 76 of the MCMC guide: http://www.bristol.ac.uk/cmm/media/soft ... mc-web.pdf), as these should be the actual matrices that it is attempting to invert.

Re: Multinomial: MCMC

Posted: Wed Nov 25, 2015 4:34 pm
by KatrijnDelar
Dear Chris,

I cannot scroll down to the bottom to see the priors for the covariance matrix (as I have 65 coefficients).
Is there another way to see them?

Many thanks,
Katrijn

Re: Multinomial: MCMC

Posted: Wed Nov 25, 2015 4:47 pm
by ChrisCharlton
Two ways that I can think of are:
  • Use the Zoom option in the equations window to allow more of the equation to be visible.
  • Use the Model->MCMC->WinBUGS output menu to obtain a version of the model as a BUGS script, which should include these Priors.

Re: Multinomial: MCMC

Posted: Wed Nov 25, 2015 7:57 pm
by KatrijnDelar
Dear Chris,

The zoom-function worked well.
As you can see, the covariance matrix is not similar to the covariances of the IGLS model
(especially the numbers I changed in column 1096).

Thanks,
Katrijn

Re: Multinomial: MCMC

Posted: Wed Nov 25, 2015 11:07 pm
by ChrisCharlton
If I remember correctly the values for these Priors are copied from the IGLS estimates at the point when you change the chosen estimation method from IGLS to MCMC. It is therefore possible that you changed the values after making the switch and therefore they weren't picked up. A solution to this would be to switch to IGLS and back to MCMC (you shouldn't need to re-run the model in between) and then check that the Priors contain the correct values.

Re: Multinomial: MCMC

Posted: Thu Nov 26, 2015 6:58 pm
by KatrijnDelar
Dear Chris,

Thank you very much for your help!
It works!!!

Katrijn