Introductie tot regressie in R
Richie Cotton
Data Evangelist at DataCamp
Brasem: het “goede” model
mdl_bream <- lm(mass_g ~ length_cm, data = bream)

Baars: het “slechte” model
mdl_perch <- lm(mass_g ~ length_cm, data = perch)

Brasem

Baars

Brasem

Baars



library(ggplot2)
library(ggfortify)
autoplot(model_object, which = ???)
Waarden voor which
1 residuen vs. voorspelde waarden2 Q-Q-plot3 schaal-locatieautoplot(
mdl_perch,
which = 1:3,
nrow = 3,
ncol = 1
)

Introductie tot regressie in R