Weight & height data
The bdims
data set from the openintro
package is loaded in your workspace. bdims
contains physical measurements on a sample of 507 individuals, including their weight in kg (wgt
) and height in cm (hgt
). You will use these data to build insights into the relationship between weight and height.
Diese Übung ist Teil des Kurses
Bayesian Modeling with RJAGS
Anleitung zur Übung
- Construct a scatterplot of
wgt
(y-axis) vshgt
(x-axis) usingggplot()
with ageom_point()
layer. - Construct a scatterplot of
wgt
vshgt
which includes ageom_smooth()
of the linear relationship between these 2 variables.
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Construct a scatterplot of wgt vs hgt
ggplot(___, aes(x = ___, y = ___)) +
geom_point()
# Add a model smooth
ggplot(___, aes(x = ___, y = ___)) +
___() +
geom_smooth(method = "lm", se = FALSE)