I'd like a function or package to plot the Normal Q-Q Plot with the 95% confidence interval, but I don't find for GLM, only GAM models and for response variables in package car
. In my example:
#Data set example
p <- read.csv("https://raw.githubusercontent.com/Leprechault/PEN-533/master/bradysia-greenhouse.csv")
#Quasi Poisson GLM
m1 <- glm(bradysia ~ area + mes, family="quasipoisson", data=p)
#Normal Q-Q Plot
plot(m1, which = 2)
#Normal Q-Q Plot with the confidence interval
I'll like a plot like above for GLM models, it is possible? There are any function or package?
There are two types of confidence intervals: 1.confidence interval for prediction (what you have shown in your plot 2) and 2. confidence interval for regression. To fit confidence interval for regression to the residuals of the glm model you can use car
package like
library(car)
qqPlot(m1$resid, ylab="Residuals", xlab="Theoretical Quantiles")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With