0

The output for the "check_model()" function in the performance package is providing the error "Variable 'Component' is not in your data frame " . I am using a glm.nb model and some of my other models do not give this error. Has anyone ever experienced this issue? How did you fix it?

glm1 <- glm.nb(Total_bySp ~ Dist_WaterM + OpenWaterLC + Percent_Deciduous + 
  PastureLC + Temp_high , data=Haem)
summary(glm1)

where all variables are numbers

why does this error occur?

MrFlick
  • 195,160
  • 17
  • 277
  • 295
emily
  • 1
  • 1
    Can you make your post [reproducible](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)? – jrcalabrese Feb 13 '23 at 21:36
  • Interestingly, this error also appears in the documentation of `see` for "Plot method for multicollinearity checks" https://easystats.github.io/see/reference/plot.see_check_collinearity.html and in the `Performance` package examples for "Check for multicollinearity of model terms" https://easystats.github.io/performance/reference/check_collinearity.html perhaps it is more of a warning than an error. I got this error as well and the plots still display properly. – Dana Feb 20 '23 at 20:11
  • Something has changed in either check_model() or a dependency or something - code that worked previously produces this warning and no output. A work-around that worked for me was to plot the check_model object, so plot(check_model(glm1)) for you. – arho Mar 14 '23 at 12:23

1 Answers1

0

According to one of the authors, "It's not a bug, just a misleading warning/message".

It was fixed back in January. You can install the dev version with:

install.packages("easystats")
easystats::install_latest(force = TRUE)

See: https://github.com/easystats/performance/issues/545

Gorka
  • 3,555
  • 1
  • 31
  • 37