mcmc error in cross-classified model

Welcome to the forum for MLwiN users. Feel free to post your question about MLwiN software 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!

Remember to check out our extensive software FAQs which may answer your question: http://www.bristol.ac.uk/cmm/software/s ... port-faqs/
Post Reply
patriciotroncoso
Posts: 9
Joined: Wed Nov 21, 2012 12:24 pm

mcmc error in cross-classified model

Post by patriciotroncoso »

Dear all,

I'm trying to fit a cross-classified multivariate normal response model, but I haven't been able to do so because of an error I can't get rid of. The empty models (2 and more levels) as well as the model with 2 covariates have run perfectly, but when I tried to add more covariates I started getting this error message: "MCMC error 0315: Prior variance matrix is not positive definite (MCMC)".

I followed the advice that I found in the MLwiN website (http://www.bristol.ac.uk/cmm/software/s ... rrors.html) about changing the starting values in column c1096, but this hasn't worked. First, I tried to change all the off-diagonal values to zero, which was unsuccessful; then I tried to change all the on-diagonal values to 0.001, but didn't work either.

Can anyone advice me as to what I'm doing wrong or what else I can do to get around this problem?

Thanks in advance!

Best,

Patricio
ChrisCharlton
Posts: 1384
Joined: Mon Oct 19, 2009 10:34 am

Re: mcmc error in cross-classified model

Post by ChrisCharlton »

What you have tried should have got rid of the errors, so I'm not sure what is going wrong here. One thing that you could try is switching to uniform priors to check whether the priors really are causing the error. To do this choose Model->MCMC->Priors and tick the "Uniform on a variance scale" option, and then try running the model again. If the model runs then would it be possible either post a screenshot of the problematic model equation or to send me an example worksheet where the error occurs and I will look into it further.
patriciotroncoso
Posts: 9
Joined: Wed Nov 21, 2012 12:24 pm

Re: mcmc error in cross-classified model

Post by patriciotroncoso »

Hi Chris

Thank you for your reply, I wanted to tell you that I think I've managed to get around this problem. I simply didn't use the IGLS estimates as starting values: After specifying additional explanatory variables, I switched to MCMC estimation straight away, without fitting the model with IGLS. Although, I got a warning message saying that using starting values of 0 for the fixed effects is not advisable, the chains seem to have mixed well, so I just carried on.

Do you think that the IGLS estimates couldn't be used as starting values for the MCMC estimation because of the cross-classified structure of the data? I really don't know anyway.

Best,

Patricio
ChrisCharlton
Posts: 1384
Joined: Mon Oct 19, 2009 10:34 am

Re: mcmc error in cross-classified model

Post by ChrisCharlton »

I'm glad to hear that you have found a solution that works. An alternative to your method would have been to have made a note of the estimates for a model that did work and then substituting these in as starting values for MCMC after running the more complex model with IGLS.

Depending on the nature of your data it may be that as you suggest that the cross-classified nature of the data was what was causing the starting value problem. As IGLS always treats your levels as hierarchical it could be that the IGLS model made no sense and therefore produced invalid starting values.
Post Reply