0
$\begingroup$

I am fitting a logistic GLM (assumed binomial distribution) with a random intercept and slope:

DV ~ 1 + IV + (1+IV|subject)

The DV is the number of successes of 200 Bernoulli trials.

I want to extract the subject-wise intercepts and use them for an ANOVA to check whether the intercepts differ with treatment levels. I'm not concerned about inference in my GLM I strictly use it to extract intercepts for the ANOVA.

The residuals of my logistic regression show clear heteroscedasticity of the residuals:

enter image description here

I checked if the residuals vary systematically with IV levels, but this is not the case.

Now, I have read different accounts of the heteroscedasticity problem in logistic regression and some people say that it's not a problem and even expected, however I'm still worrying that this will cause trouble for my second level ANOVA.

I'd be glad if someone could help me in assessing the gravity of this heteroscedasticity problem and whether I should worry about it.

$\endgroup$
3
  • 2
    $\begingroup$ Since the variance in a binomial distribution is a function of the mean, there is no assumptionof homoskedasticity in logistic regression. The plots you are presenting are not the best diagnostic plots for LR, see stats.stackexchange.com/questions/351472/… or stats.stackexchange.com/questions/341655/… $\endgroup$ Jan 10, 2021 at 3:57
  • 1
    $\begingroup$ I understand now that logistic GLMs need a completely different diagnostics assessment than ordinary linear models, I didn't know this before thank you! I'm wondering now how I can flag this question as answered? $\endgroup$
    – Maria
    Jan 11, 2021 at 8:22
  • 1
    $\begingroup$ @Maria, you can calculated scaled residuals for logistic regression with the DHARMa cran.r-project.org/web/packages/DHARMa/index.html, see vignette for details. $\endgroup$ Feb 9, 2021 at 21:49

0