In the following exercises, you will work on your own ‘research question’ using the GESIS Panel data. If you have not already done so, you can load the data first using the following code:
library(haven)
library(dplyr)
library(sjlabelled)
gp_covid <-
read_sav(
"./data/ZA5667_v1-1-0.sav"
) %>%
set_na(na = c(-1:-99, 97, 98)) %>%
rowwise() %>%
mutate(
mean_trust =
mean(
c_across(hzcy044a:hzcy052a),
na.rm = TRUE
)
) %>%
ungroup() %>%
remove_all_labels() %>%
mutate(
pol_leaning_cat =
case_when(
between(political_orientation, 0, 3) ~ "left",
between(political_orientation, 4, 7) ~ "center",
political_orientation > 7 ~ "right"
) %>%
as.factor()
) %>%
filter(pol_leaning_cat != "NA")
If you’re really struggling to find something you like, what about the following variables:
education_cat as covariate. If it is part of your predictor variables (IV), choose another one. Then check visually if the residuals are normally distributed.
performance and see packages for this task (and dplyr for the preparatory wrangling part).
performance package.