Download the template R markdown file for this workshop.
In this exercise you will:
You need to have installed R, RStudio, and the necessary packages for
the course, including the ELMER
package. See how to
get set up for this course
data(BabyWeights, package="ELMER")
str(BabyWeights)
'data.frame': 24 obs. of 3 variables:
$ Age : int 40 36 40 38 42 39 40 37 36 38 ...
$ Weight: int 3317 2729 2935 2754 3210 2817 3126 2539 2412 2991 ...
$ Gender: Factor w/ 2 levels "Female","Male": 1 1 1 1 1 1 1 1 1 1 ...
As per the example in ELMER, you need to fit five models. Make sure you label them carefully to match ELMER.
N.B. You should try to do this using ggplot()
if you
can.
Starting with:
= BabyWeights |> ggplot(aes(y=Weight,x=Age)) + geom_point(aes(col=Gender)) Graph0
You should compare your work with the solutions for this workshop.