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
Multinomial: MCMC

 Posts: 11
 Joined: Mon Aug 17, 2015 1:43 pm
Multinomial: MCMC
 Attachments

 Variance Matrix.PNG (11.58 KiB) Viewed 18993 times

 Posts: 1252
 Joined: Mon Oct 19, 2009 10:34 am
Re: Multinomial: MCMC
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.
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.

 Posts: 11
 Joined: Mon Aug 17, 2015 1:43 pm
Re: Multinomial: MCMC
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
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
 Attachments

 Priors_1.PNG (16.72 KiB) Viewed 18988 times

 Posts: 1252
 Joined: Mon Oct 19, 2009 10:34 am
Re: Multinomial: MCMC
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 ... mcweb.pdf), as these should be the actual matrices that it is attempting to invert.

 Posts: 11
 Joined: Mon Aug 17, 2015 1:43 pm
Re: Multinomial: MCMC
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
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

 Posts: 1252
 Joined: Mon Oct 19, 2009 10:34 am
Re: Multinomial: MCMC
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.

 Posts: 11
 Joined: Mon Aug 17, 2015 1:43 pm
Re: Multinomial: MCMC
Dear Chris,
The zoomfunction 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
The zoomfunction 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
 Attachments

 Covariance matrix.PNG (5.15 KiB) Viewed 18982 times

 Posts: 1252
 Joined: Mon Oct 19, 2009 10:34 am
Re: Multinomial: MCMC
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 rerun the model in between) and then check that the Priors contain the correct values.

 Posts: 11
 Joined: Mon Aug 17, 2015 1:43 pm
Re: Multinomial: MCMC
Dear Chris,
Thank you very much for your help!
It works!!!
Katrijn
Thank you very much for your help!
It works!!!
Katrijn