Numerical error calculating likelihood

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
jeanninekhan
Posts: 6
Joined: Wed Dec 02, 2009 10:28 am

Numerical error calculating likelihood

Post by jeanninekhan »

Hallo
I fited a 3 level model (level 1: time level, level 2: individual level, level 3: class level) for a longitudinal study with
random slopes. The gains over time vary on class and on individual level.
Unfortunaly i get the following error message after calculating the model concerning the 2*loglikelihood: "numerical error calculating likelihood".
Could anyone tell me whats the problem? Is it a serious problem?

Thank you, Jeannine
Lydia
Posts: 26
Joined: Tue Oct 13, 2009 2:55 pm

Re: Numerical error calculating likelihood

Post by Lydia »

It sounds like you might have overparameterised your model. Are you including time as a set of dummy variables, and have you allowed each of those dummy variables to be random at level 2? If so, then for each individual you have the same number of random effects at level 2 as you have observations (1 random intercept plus slopes on (number of time points - 1) dummies). This means that you can exactly predict every point using just the fixed part and the level 2 and 3 random parts, so there is no random variation left for level 1. In my experience, this leads to an error calculating the likelihood.

You therefore probably want to leave at least one of your level 2 random effects out. Another possibility is to try putting a linear time trend in or a polynomial (treating time as continuous, which may not make sense depending on your data). You could see if a linear time trend seems reasonable by plotting each individual's set of observations. Something else to try if you don't want to treat time as continuous is orthogonal polynomials (see the MLwiN v2.1 manual supplement). These will allow you to put in fewer random effects than you have observations without including some observations in the level 2 random part and missing some out (as would be the case if you just picked some of the time dummies to put random effects on). The orthogonal polynomials allow you to use information from all the observations without using up too many degrees of freedom.
Post Reply