CIs for slope residuals

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
DSax57
Posts: 2
Joined: Mon Aug 01, 2011 12:55 pm

CIs for slope residuals

Post by DSax57 »

Hi
Any help much appreciated.. i've got a random slope model (N level 1 =10000, N level 2=119)
when i plot the residuals for the slope no error amount is calculated for a number of the level 2 units. I get a numeric error message during the calcs and there are a number 'missing' in the dataset. The result in the caterpillar plot is that some have CIs that go off the top & bottom of the chart.
I wondered why this should be & what does it mean? Should those level 2 units that do this be considered NOT significantly different from the average or is there a data error somewhere.
Thanks
billb
Posts: 157
Joined: Fri May 21, 2010 1:21 pm

Re: CIs for slope residuals

Post by billb »

Hi Dave,
I took a look at your data and discovered that the IGLS algorithm is estimating a non-positive definite variance matrix at level 2. Apologies for the technical jargon but basically if you were to look at your
estimates for the between TherID variance matrix in the Estimate Tables window and click on the C tick to get correlations you'll see that the correlation between intercepts and slopes is >1. A correlation of 1 would be perfectly correlated intercepts and slopes with the bigger the intercept the bigger the slope. The MCMC estimation methods in MLwiN will fit the model without this issue but also get really strongly correlated intercepts and slopes.
So I looked more closely at your data and did a simple histogram of your outcome variable - this is quite skewed and suggests to me that it would be better to model a log transformed variable (in your case log(v+c)) as you have some zeroes where c could be say 0.1 or 1. When you do this the models fit better and the problem goes away. The high correlation in the initial model might suggest that the predictor in question has a multiplicative effect rather than an additive effect on your response and so logging the response will make predictors have a multiplicative effect on the original variable. You might want to log the predictors as well if that makes sense.
Anyway I think you are coming on the workshop in a few weeks so we can talk about this more then.
Best wishes,
Bill.
Post Reply