Ajustarea pentru erori non-normale
În acest ultim exemplu, punctele par să nu fie distribuite normal în jurul dreptei de regresie. Reține că transformarea aplicată în acest exercițiu modifică atât variabilitatea, cât și liniaritatea relației.
Acest exercițiu face parte din cursul
Inferență pentru regresia liniară în R
Exercițiu interactiv practic
Încearcă acest exercițiu completând acest cod de exemplu.
# Run this to see how the model looks
ggplot(hypdata_nonnorm, aes(x = explanatory, y = response)) +
geom_point() +
geom_smooth(method = "lm", se = FALSE)
# Model response vs. explanatory
model <- ___
# Extract observation-level information
modeled_observations <- ___
# See the result
modeled_observations
# Using modeled_observations, plot residuals vs. fitted values
___