All level 2 random effects are zero

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

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
Post Reply
michaellawton
Posts: 11
Joined: Tue Nov 22, 2011 10:40 pm

All level 2 random effects are zero

Post by michaellawton »

I have been having some problems with a model of a subset of my data. With other subsets or all my data I have been getting sensible results. My model is a repeated measures model with a continuous outcome (score) nested in individuals (patid) as detailed below where cons=1 and fp1 and fp6 are time and log time variables respectively.

matrix a =(1,1,0)
runmlwin score cons fp1 fp6 ///
level2(patid: cons fp1 fp6) level1(scoreid: cons fp1,elements(a))///


In the format above I have no problems. However if I add certain (individual specific) covariates to the above model all the level 2 random effects have an estimate and std. error of zero. Some subsets of the covariates give sensible results however some subsets lead to this problem. Any assistance would be appreciated.
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: All level 2 random effects are zero

Post by GeorgeLeckie »

Hi Michael,

This query is likely to be more one which relates to your data and to the models which you are choosing to fit, than one specific to runmlwin or MLwiN. That is, you are likely to run into the same problems whatever multilevel software you use.

Having said that, one thing that is definitely worth trying is building up to your final model gradually. When people have convergence problems fitting complex multilevel models this often helps although not all multilevel software provide such an option.

So first fit the unconditional growth curves model

Code: Select all

matrix a =(1,1,0)
runmlwin score cons fp1 fp6 ///
    level2(patid: cons fp1 fp6) ///
    level1(scoreid: cons fp1, elements(a)) ///
    nopause
Then fit the conditional growth curve model where you use the parameter estimates from the first model as the starting values for this model. In the example below I have added the individual level dummy variable girl to your model and a variable called girlXfp1 which is a cross-level interaction between girl and fp1.

Code: Select all

matrix a =(1,1,0)
generate girlXfp1 = girl*fp1
runmlwin score cons fp1 fp6 girl girlXfp1 ///
    level2(patid: cons fp1 fp6) ///
    level1(scoreid: cons fp1, elements(a)) ///
    initsprevious nopause
You might also want to check that the constraints that you are imposing at level-2 are sensible given the patterns in the data. You might also want to allow level-2 variances to temporarily go negative as this may relieve your stuck at zero problem.

Failing that I would do a descriptive and graphical exploration of the subset of data which does work and the subset which doesn't work in order to try to establish what differences are the cause of one subset leading to a converged model and the other subset not.

I hope this helps

Best wishes

George
Post Reply