I'm fitting a model with a 2-level categorical and a numerical predictor. As far as I'm concerned, I cannot use
car::LeveneTest() to assess homoscedasticity since I have a numerical predictor, right? What should I use instead to assess homoscedasticity on both numerical and categorical predictors?
- expected error:
car::leveneTest(lmer(SCORE ~ EXAM_GRADE * TASK_TYPE + (1|ID), data = dfModels1, REML = F)) Error in leveneTest.default(lmer(SCORE ~ EXAM_GRADE * TASK_TYPE + (1 | : lmer(SCORE ~ EXAM_GRADE * TASK_TYPE + (1 | ID), data = dfModels1, REML = F) is not a numeric variable
ID has a
SCORE on two different
TASKs. They also have a score on another
Exam Grade. The basic idea is that
Exam Grade predicts
SCORE independenly of the task type.
ID SCORE EXAM_GRADE TASK_TYPE <chr> <dbl> <dbl> <fct> 1 1_101 7.1 100 A 2 1_101 4.92 100 N 1 2_101 7.4 36 A 2 2_101 7 36 N
Maybe the Breusch-Pagan test (such as
Obs: I'm aware that I should prefer visual inspection instead, I'm also doing that, but I'd like to find a way to assess the assumption numerically as well just in case.