I would like to visualize to find out if my model is normally distributed
I used that code
zh <- ch %>% filter(ch$Region=="1")
model <- lm(ratiopermonth~Greenspace, data = zh)
qqline(rstandard(model))
But I got that error messages
error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet
What is wrong?
CodePudding user response:
qqline
is to be used after qqnorm
.
r <- rstandard(model)
qqnorm(r)
qqline(r)