Random effects with multilevel binomial data

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
rdmcdowell
Posts: 31
Joined: Mon Apr 02, 2012 3:26 pm

Random effects with multilevel binomial data

Post by rdmcdowell »

I noted when reading the runmlwin guide (p18) that when fitting a multilevel Bernoulli model no individual level error appears in the linear predictor. I was wondering if someone could clarify why this was the case. When I try to fit a simple multilevel logistic model using runmlwin looking at level 1 residuals e.g.

runmlwin smoke cons age, level2(pracid: cons) level1(patient_id:, residuals(stand)) discrete(distribution(binomial) link(logit) denominator(cons) pql2)

I get an error message:

option rpxvars() required.

However if I fit the model directly in Mlwin, I seem to be able to specify and get output for level 1 (as well as level 2) residuals. I can also get e.g. anscombe residuals if fitting the same model using xtmelogit in stata, and these appear to be calculated at an individual level. I am hence unclear as to how to reconcile these facts. Thank you for any insight you can offer.
ChrisCharlton
Posts: 1384
Joined: Mon Oct 19, 2009 10:34 am

Re: Random effects with multilevel binomial data

Post by ChrisCharlton »

Level-one residuals being available for discrete models in -runmlwin- is a bug, which will be fixed in the next release. In the mean time I have attached our current development version where this is fixed.
Attachments
runmlwin.zip
(50.56 KiB) Downloaded 472 times
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: Random effects with multilevel binomial data

Post by GeorgeLeckie »

Dear rdmcdowell,

In terms of

"I noted when reading the runmlwin guide (p18) that when fitting a multilevel Bernoulli model no individual level error appears in the linear predictor. I was wondering if someone could clarify why this was the case."

Adding a level-1 random effect to the level-1 predictor equates to attempting to allow for over-dispersion. However, over-dispersion cannot be modelled for binary responses and the Bernoulli distribution. See Sections 2.1 and 2.2 of Skrondal and Rabe-Hesketh (2007) for formal proof

Skrondal, A., & Rabe-Hesketh, S. (2007). Redundant overdispersion parameters in multilevel models for categorical responses. Journal of Educational and Behavioral Statistics, 32(4), 419-430.

Best wishes

George
rdmcdowell
Posts: 31
Joined: Mon Apr 02, 2012 3:26 pm

Re: Random effects with multilevel binomial data

Post by rdmcdowell »

Thanks for those helpful posts. When I run a 2 level logit model in mlwin directly, I can get level 1 and level 2 residuals. I'm still unclear how it's possible to obtain level 1 residuals in a discrete model if there's no level 1 residual error term in the model. Stata does the same, and my lack of understanding is leading to my confusion.
Post Reply