I am interested in creating a qq plot using ggformula. Here is my code:
#Construct a QQ plot
install.packages('ggformula')
library(ggformula)
library(ggplot2)
couples <- read.csv('age.csv') #simply the ages (int) of wife (WAge) and husband(HAge)
fit <- lm(WAge ~ HAge, data = couples)
summary(fit)
diag <- augment(fit)
ggplot(data = diag, aes(sample = .resid)) +
geom_qq() + stat_qqline()
But............................here's the error message:
Error in stat$parameters(TRUE) : attempt to apply non-function
In addition: Warning messages:
1: In structure(NULL, class = "waiver") :
Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
Consider 'structure(list(), *)' instead.
2: In structure(NULL, class = "waiver") :
Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
Consider 'structure(list(), *)' instead.
Any thoughts would be appreciated and thank you!
Greg