3 level model: problems with cov matrix at level 2

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
ClaudiaSchuchart
Posts: 5
Joined: Fri Nov 08, 2013 6:20 pm

3 level model: problems with cov matrix at level 2

Post by ClaudiaSchuchart »

Dear all,
I fited a 3 level model (level 1: time level, level 2: individual level, level 3: school level) with a random slope for the gains over time(specified as a metric variable) at the school and the individual level. My goal is to run this model in the MCMC mode (multiple membership structure at school level).
Then I fit the model as 3-lvel-model with IGLS, I get significant positive variances and covariances at the individual and the school level.
However, the problem is, that the "correlations implied by my covariance matrix at the individual level lies outside the boundaries of the feasible parameter space". In this case, the correlation is 2.135. Then I fit the MCMC model, this naturally provides the error 0315 (variance matrix is not positive definite).
I know from the user forum that something is not right with my data. However, I cannot identify what it exactly is, probably because I do not use the right strategies. What should I do if I don't want to manually provide better starting values?
Sorry for this naive question and thanks a lot in advance,
Claudia
billb
Posts: 157
Joined: Fri May 21, 2010 1:21 pm

Re: 3 level model: problems with cov matrix at level 2

Post by billb »

Good Morning Claudia,
It is as you have surmised possible for the IGLS method that really works on the full covariance matrix of the observations to construct parameter estimates that when evaluated as for example between school variances, correlations etc. give implausible values for this interpretation of the model. This is because strictly speaking although the values don't make sense when interpreting them as level 2 variances and covariances they are acceptable as elements of the global variance/covariance matrix between observations.
MCMC uses the values in 2 ways - 1) as a starting point for the algorithm 2) In the case of random slopes to give an estimate for the Wishart prior distribution of higher level variances.
Both of these require that the values make sense (i.e. the variance/covariance matrix at higher levels has to be positive definite) as MCMC will fit the model that the equations window actually displays i.e. it really does have level 2 random effects
with a variance/covariance matrix. Our suggestion is therefore usually to set the covariance terms to 0 or some value such that the matrices are positive definite. For use (1) starting values choice is less important as the chains should reach the correct posterior regardless. For use (2) however the priors, even though we give them as low as degrees of freedom and hence importance as possible, are part of the model so one would suggest checking for prior sensitivity. Here this means manually providing other estimates for the matrix (as starting values) and checking the impact on estimates. To do this one runs IGLS and upon convergence go into the column (c1096) and change the values to represent different matrices prior to switching to MCMC. Clicking on the + button after switching to MCMC will show the priors being used.
I hope this helps,
Regards,
Bill.
Post Reply