Page 1 of 1

Three-level model with two random slopes

Posted: Mon Nov 30, 2020 11:56 am
by johannesmueller
Dear all

I am trying to fit a (nested) three-level model with a three-way interaction, where there are constituent terms of the moderation at all three levels.
i.e. the response is observed at level 1 (binary), moderator1 at level1, moderator2 at level2, and moderator3 at level3. Moderators1 and 2 are group mean centered at level 3.

Now, I would want to allow the slopes of moderator1 and moderator2 to vary at level 3.

While it works with the diagonal restriction

Code: Select all

runmlwin DV cons c.L##c.F##c.S  level3(level3: cons F S ,diagonal ) level2(level2: cons) level1(level1) discrete(distribution(binomial) link(logit) denom(cons)) nopause or zratio maxiterations(50000)

once I take the diagonal restriction out -which I would want-

Code: Select all

runmlwin DV cons c.L##c.F##c.S  level3(level3: cons F S ) level2(level2: cons) level1(level1) discrete(distribution(binomial) link(logit) denom(cons)) nopause or zratio maxiterations(50000)
The result is that cov(cons,S), cov(F,S), and var(S) are returned as 0.
  • How can I recover these parts of the model?

Thank you very much in advance!

Re: Three-level model with two random slopes

Posted: Fri Dec 04, 2020 12:23 pm
by ChrisCharlton
I asked George about this and he said the following:

It is harder to fit random slopes in models with a binary response, and it is easier to hit convergence issues. There might not be sufficiently large clusters and response variation to fit the desired model. In this case it appears that the level-3 covariance matrix has been reset to zero and is stuck there.

His suggestions are:
  • Try just one or other random slope first and then using simpler model to give starting values for the more complex model.
  • Manually type in plausible starting values then fit the model by MCMC.