Stratified designs in R
Now let's practice specifying a stratified sampling design, using the dataset apistrat
. The schools are stratified based on the school type stype
where E = Elementary, M = Middle, and H = High School. For each school type, a simple random sample of schools was taken.
This exercise is part of the course
Analyzing Survey Data in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Glimpse the data
glimpse(___)