2025-02-12
Needed to pick the variable from your research question + 2 others (or 3 if you chose a different variable in your research question)
att7)iam_001)identfat_001 )identthen_001 )controlother_001)controlyou_001)mostpref_001 )important_001)Needed to include all 4 demographic variables:
birthmonth, birthyear, testmonth, and testyear)raceomb_002 or raceombmulti)ethnicityomb)birthSex)Please pick only 2 additional variables:
edu_14)genderIdentity)load(file = here("../Project/data/iat_data.rda"))
iat_2021 = iat_2021 %>%
select(IAT_score = D_biep.Thin_Good_all,
att7, iam_001, identfat_001,
myweight_002, myheight_002,
identthin_001, controlother_001,
controlyou_001, mostpref_001,
important_001,
birthmonth, birthyear, month, year,
raceomb_002, raceombmulti, ethnicityomb,
edu, edu_14,
genderIdentity,
birthSex) %>%
drop_na()iat_2021 = iat_2021 %>% mutate(iam_001_f = case_match(iam_001,
7 ~ "Very overweight",
6 ~ "Moderately overweight",
5 ~ "Slightly overweight",
4 ~ "Neither underweight nor underweight",
3 ~ "Slightly underweight",
2 ~ "Moderately underweight",
1 ~ "Very underweight",
.default = NA) %>%
factor(levels = c("Very underweight", # Assigns the level order!
"Moderately underweight",
"Slightly underweight",
"Neither underweight nor underweight",
"Slightly overweight",
"Moderately overweight",
"Very overweight")))| Characteristic | N = 242,7621 |
|---|---|
| iam_001_f | |
| Very underweight | 1,341 (0.6%) |
| Moderately underweight | 5,436 (2.2%) |
| Slightly underweight | 17,224 (7.1%) |
| Neither underweight nor underweight | 106,836 (44%) |
| Slightly overweight | 65,418 (27%) |
| Moderately overweight | 32,259 (13%) |
| Very overweight | 14,248 (5.9%) |
| 1 n (%) | |
raceombmulti and genderIdentityThere is extra data management skills that we need to address these
Let’s walk through categorical variables that have multiple selections
Another note: I find that the race variable is still lacking (where is my MENA representation??)
HW 2 and Lab 2