0

I am trying to create a qqline plot but I'm having consistent issues getting the following error:

Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : 
plot.new has not been called yet

This is what I tried:

plot(allEffects(model1))
dotplot(ranef(model1, condVar = TRUE))
r_int <- ranef(model1)$ElkID$`(Intercept)`
qqnorm(r_int)
qqline(r_int)

Everything worked fine except for qqline(r_int), where I was greeted with the same error:

Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : 
plot.new has not been called yet
Mikael Jagan
  • 9,012
  • 2
  • 17
  • 48
Potato
  • 1
  • 1
  • 1
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input that can be used to test and verify possible solutions. List all non-base R packages you are using. – MrFlick Mar 13 '23 at 15:03
  • A wild guess: `dotplot` is defunct and deprecated, and most likely is fouling up the apparent existence of a plot window. Use the recommended `dotchart` . In fact, I tried this and had no problem with `qqline`. Make sure your version of R and all libraries are up to date. – Carl Witthoft Mar 13 '23 at 15:36
  • I will try dotchart now, thanks! – Potato Mar 13 '23 at 16:31
  • Please provide enough code so others can better understand or reproduce the problem. – Community Mar 13 '23 at 18:05

0 Answers0