The present analysis is based on 1066 respondents from South Africa, Nigeria, Kenya, and Ghana completing our survey for pilot wave 9 (Jan 2023). The related GitHub issue is here.
We have 21 sorting questions, each answered on a Likert scale from 1 to 5 (1 = I Disagree Strongly, 2 = I Disagree, 3 = I’m Unsure, 4 = I Agree 5 = I Agree Strongly):
| Question Text | Variable Name |
|---|---|
| People are still dying from COVID. | covid_is_a_problem |
| COVID is a problem in [my country] | covid_is_problem_my_country |
| I think the COVID vaccines are safe | vax_is_safe |
| COVID vaccines help prevent serious sickness and death | vax_prevent_sick_death |
| You need a vaccine for protection from sickness (not because you are sick) | need_vax_for_protection |
| Getting the vaccine is much safer than getting COVID | vax_safer_covid |
| I think the people who developed the vaccine wanted to help people | developer_want_to_help |
| I think my local healthcare workers want me to be healthy and well | health_worker_want_to_help |
| I think my government’s department of health workers want me to be healthy and well | gov_want_to_help |
| It is important to me that I protect myself from the effects of COVID | important_to_protect_myself |
| It is important to me that I protect others from the effects of COVID | important_to_protect_other |
| Getting vaccinated is a moral issue | vax_moral |
| I worry about short-term side effects of the COVID vaccine | worry_short_term_side_effect |
| I worry about long-term side effects of the COVID vaccine | worry_long_term_side_effect |
| COVID has killed millions of people worldwide | covid_is_real |
| I will probably be exposed to someone with COVID over the next year | probably_exposed |
| I am very afraid of needles | afraid_needle |
| I am a deeply religious person | deeply_religious |
| It is important to me that I be a moral person | important_moral |
| It is important to me to feel like I “fit in” in with my group | fit_in_group_importance |
| It is important to me to feel like I am a responsible member of my community | responsible_importance |
We assess the relationship between these 21 sorting questions and 5 trust-related factors output from the factor analysis:
rowvec <- c("health_department", "who", "clinic_worker", "doctor")
# associations
mat1.1 <-
df %>%
select(rowvec[1], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.2 <-
df %>%
select(rowvec[2], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.3 <-
df %>%
select(rowvec[3], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.4 <-
df %>%
select(rowvec[4], sorting_qs) %>%
mutate(doctor = parse_number(doctor)) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
# pvalues
matp1.1 <-
df %>%
select(rowvec[1], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.2 <-
df %>%
select(rowvec[2], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.3 <-
df %>%
select(rowvec[3], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.4 <-
df %>%
select(rowvec[4], sorting_qs) %>%
mutate(doctor = parse_number(doctor)) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
final_mat <- tibble(mat1.1, mat1.2, mat1.3, mat1.4) %>% as.matrix() %>% t()
final_pmat <- tibble(matp1.1, matp1.2, matp1.3, matp1.4) %>% as.matrix() %>% t()
colnames(final_mat) <- sorting_qs
rownames(final_mat) <- rowvec
rownames(final_pmat) <- rowvec
ggcorrplot(final_mat, lab = TRUE, lab_size = 3, tl.cex = 10, p.mat = final_pmat, colors = c(cb_colors[2], "white", cb_colors[1])) +
labs(subtitle = "Sorting Questions x Trust Factor 1\n(N = 1066)") +
theme(legend.position = "bottom")rowvec <- c("health_department", "who", "clinic_worker", "doctor")
# associations
mat1.1 <-
df %>%
filter(vax_next_year %in% c(1, 5)) %>%
select(rowvec[1], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.2 <-
df %>%
filter(vax_next_year %in% c(1, 5)) %>%
select(rowvec[2], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.3 <-
df %>%
filter(vax_next_year %in% c(1, 5)) %>%
select(rowvec[3], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.4 <-
df %>%
filter(vax_next_year %in% c(1, 5)) %>%
select(rowvec[4], sorting_qs) %>%
mutate(doctor = parse_number(doctor)) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
# pvalues
matp1.1 <-
df %>%
filter(vax_next_year %in% c(1, 5)) %>%
select(rowvec[1], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.2 <-
df %>%
filter(vax_next_year %in% c(1, 5)) %>%
select(rowvec[2], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.3 <-
df %>%
filter(vax_next_year %in% c(1, 5)) %>%
select(rowvec[3], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.4 <-
df %>%
filter(vax_next_year %in% c(1, 5)) %>%
select(rowvec[4], sorting_qs) %>%
mutate(doctor = parse_number(doctor)) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
final_mat <- tibble(mat1.1, mat1.2, mat1.3, mat1.4) %>% as.matrix() %>% t()
final_pmat <- tibble(matp1.1, matp1.2, matp1.3, matp1.4) %>% as.matrix() %>% t()
colnames(final_mat) <- sorting_qs
rownames(final_mat) <- rowvec
rownames(final_pmat) <- rowvec
ggcorrplot(final_mat, lab = TRUE, lab_size = 3, tl.cex = 10, p.mat = final_pmat, colors = c(cb_colors[2], "white", cb_colors[1])) +
labs(subtitle = "Sorting Questions x Trust Factor 1\n(N = 578)") +
theme(legend.position = "bottom")rowvec <- c("health_department", "who", "clinic_worker", "doctor")
# associations
mat1.1 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[1], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.2 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[2], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.3 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[3], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.4 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[4], sorting_qs) %>%
mutate(doctor = parse_number(doctor)) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
# pvalues
matp1.1 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[1], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.2 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[2], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.3 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[3], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.4 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[4], sorting_qs) %>%
mutate(doctor = parse_number(doctor)) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
final_mat <- tibble(mat1.1, mat1.2, mat1.3, mat1.4) %>% as.matrix() %>% t()
final_pmat <- tibble(matp1.1, matp1.2, matp1.3, matp1.4) %>% as.matrix() %>% t()
colnames(final_mat) <- sorting_qs
rownames(final_mat) <- rowvec
rownames(final_pmat) <- rowvec
ggcorrplot(final_mat, lab = TRUE, lab_size = 3, tl.cex = 10, p.mat = final_pmat, colors = c(cb_colors[2], "white", cb_colors[1])) +
labs(subtitle = "Sorting Questions x Trust Factor 1\n(N = 488)") +
theme(legend.position = "bottom")rowvec <- c("international_scientist", "international_ngo", "african_scientist")
# associations
mat1.1 <-
df %>%
select(rowvec[1], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.2 <-
df %>%
select(rowvec[2], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.3 <-
df %>%
select(rowvec[3], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
# pvalues
matp1.1 <-
df %>%
select(rowvec[1], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.2 <-
df %>%
select(rowvec[2], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.3 <-
df %>%
select(rowvec[3], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
final_mat <- tibble(mat1.1, mat1.2, mat1.3) %>% as.matrix() %>% t()
final_pmat <- tibble(matp1.1, matp1.2, matp1.3) %>% as.matrix() %>% t()
colnames(final_mat) <- sorting_qs
rownames(final_mat) <- rowvec
rownames(final_pmat) <- rowvec
ggcorrplot(final_mat, lab = TRUE, lab_size = 3, tl.cex = 10, p.mat = final_pmat, colors = c(cb_colors[2], "white", cb_colors[1])) +
labs(subtitle = "Sorting Questions x Trust Factor 2\n(N = 1066)") +
theme(legend.position = "bottom")rowvec <- c("international_scientist", "international_ngo", "african_scientist")
# associations
mat1.1 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[1], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.2 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[2], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.3 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[3], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
# pvalues
matp1.1 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[1], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.2 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[2], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.3 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[3], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
final_mat <- tibble(mat1.1, mat1.2, mat1.3) %>% as.matrix() %>% t()
final_pmat <- tibble(matp1.1, matp1.2, matp1.3) %>% as.matrix() %>% t()
colnames(final_mat) <- sorting_qs
rownames(final_mat) <- rowvec
rownames(final_pmat) <- rowvec
ggcorrplot(final_mat, lab = TRUE, lab_size = 3, tl.cex = 10, p.mat = final_pmat, colors = c(cb_colors[2], "white", cb_colors[1])) +
labs(subtitle = "Sorting Questions x Trust Factor 2\n(N = 578)") +
theme(legend.position = "bottom")rowvec <- c("international_scientist", "international_ngo", "african_scientist")
# associations
mat1.1 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[1], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.2 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[2], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.3 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[3], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
# pvalues
matp1.1 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[1], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.2 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[2], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.3 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[3], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
final_mat <- tibble(mat1.1, mat1.2, mat1.3) %>% as.matrix() %>% t()
final_pmat <- tibble(matp1.1, matp1.2, matp1.3) %>% as.matrix() %>% t()
colnames(final_mat) <- sorting_qs
rownames(final_mat) <- rowvec
rownames(final_pmat) <- rowvec
ggcorrplot(final_mat, lab = TRUE, lab_size = 3, tl.cex = 10, p.mat = final_pmat, colors = c(cb_colors[2], "white", cb_colors[1])) +
labs(subtitle = "Sorting Questions x Trust Factor 2\n(N = 488)") +
theme(legend.position = "bottom")rowvec <- c("community_leader", "minister_religious_leader", "community_based_org")
# associations
mat1.1 <-
df %>%
select(rowvec[1], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.2 <-
df %>%
select(rowvec[2], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.3 <-
df %>%
select(rowvec[3], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
# pvalues
matp1.1 <-
df %>%
select(rowvec[1], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.2 <-
df %>%
select(rowvec[2], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.3 <-
df %>%
select(rowvec[3], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
final_mat <- tibble(mat1.1, mat1.2, mat1.3) %>% as.matrix() %>% t()
final_pmat <- tibble(matp1.1, matp1.2, matp1.3) %>% as.matrix() %>% t()
colnames(final_mat) <- sorting_qs
rownames(final_mat) <- rowvec
rownames(final_pmat) <- rowvec
ggcorrplot(final_mat, lab = TRUE, lab_size = 3, tl.cex = 10, p.mat = final_pmat, colors = c(cb_colors[2], "white", cb_colors[1])) +
labs(subtitle = "Sorting Questions x Trust Factor 3\n(N = 1066)") +
theme(legend.position = "bottom")rowvec <- c("community_leader", "minister_religious_leader", "community_based_org")
# associations
mat1.1 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[1], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.2 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[2], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.3 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[3], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
# pvalues
matp1.1 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[1], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.2 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[2], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.3 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[3], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
final_mat <- tibble(mat1.1, mat1.2, mat1.3) %>% as.matrix() %>% t()
final_pmat <- tibble(matp1.1, matp1.2, matp1.3) %>% as.matrix() %>% t()
colnames(final_mat) <- sorting_qs
rownames(final_mat) <- rowvec
rownames(final_pmat) <- rowvec
ggcorrplot(final_mat, lab = TRUE, lab_size = 3, tl.cex = 10, p.mat = final_pmat, colors = c(cb_colors[2], "white", cb_colors[1])) +
labs(subtitle = "Sorting Questions x Trust Factor 3\n(N = 578)") +
theme(legend.position = "bottom")rowvec <- c("community_leader", "minister_religious_leader", "community_based_org")
# associations
mat1.1 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[1], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.2 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[2], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.3 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[3], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
# pvalues
matp1.1 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[1], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.2 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[2], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.3 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[3], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
final_mat <- tibble(mat1.1, mat1.2, mat1.3) %>% as.matrix() %>% t()
final_pmat <- tibble(matp1.1, matp1.2, matp1.3) %>% as.matrix() %>% t()
colnames(final_mat) <- sorting_qs
rownames(final_mat) <- rowvec
rownames(final_pmat) <- rowvec
ggcorrplot(final_mat, lab = TRUE, lab_size = 3, tl.cex = 10, p.mat = final_pmat, colors = c(cb_colors[2], "white", cb_colors[1])) +
labs(subtitle = "Sorting Questions x Trust Factor 3\n(N = 488)") +
theme(legend.position = "bottom")rowvec <- c("local_news_media", "international_news_media")
# associations
mat1.1 <-
df %>%
select(rowvec[1], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.2 <-
df %>%
select(rowvec[2], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
# pvalues
matp1.1 <-
df %>%
select(rowvec[1], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.2 <-
df %>%
select(rowvec[2], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
final_mat <- tibble(mat1.1, mat1.2) %>% as.matrix() %>% t()
final_pmat <- tibble(matp1.1, matp1.2) %>% as.matrix() %>% t()
colnames(final_mat) <- sorting_qs
rownames(final_mat) <- rowvec
rownames(final_pmat) <- rowvec
ggcorrplot(final_mat, lab = TRUE, lab_size = 3, tl.cex = 10, p.mat = final_pmat, colors = c(cb_colors[2], "white", cb_colors[1])) +
labs(subtitle = "Sorting Questions x Trust Factor 4\n(N = 1066)") +
theme(legend.position = "bottom")rowvec <- c("local_news_media", "international_news_media")
# associations
mat1.1 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[1], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.2 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[2], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
# pvalues
matp1.1 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[1], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.2 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[2], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
final_mat <- tibble(mat1.1, mat1.2) %>% as.matrix() %>% t()
final_pmat <- tibble(matp1.1, matp1.2) %>% as.matrix() %>% t()
colnames(final_mat) <- sorting_qs
rownames(final_mat) <- rowvec
rownames(final_pmat) <- rowvec
ggcorrplot(final_mat, lab = TRUE, lab_size = 3, tl.cex = 10, p.mat = final_pmat, colors = c(cb_colors[2], "white", cb_colors[1])) +
labs(subtitle = "Sorting Questions x Trust Factor 4\n(N = 578)") +
theme(legend.position = "bottom")rowvec <- c("local_news_media", "international_news_media")
# associations
mat1.1 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[1], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.2 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[2], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
# pvalues
matp1.1 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[1], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.2 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[2], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
final_mat <- tibble(mat1.1, mat1.2) %>% as.matrix() %>% t()
final_pmat <- tibble(matp1.1, matp1.2) %>% as.matrix() %>% t()
colnames(final_mat) <- sorting_qs
rownames(final_mat) <- rowvec
rownames(final_pmat) <- rowvec
ggcorrplot(final_mat, lab = TRUE, lab_size = 3, tl.cex = 10, p.mat = final_pmat, colors = c(cb_colors[2], "white", cb_colors[1])) +
labs(subtitle = "Sorting Questions x Trust Factor 4\n(N = 488)") +
theme(legend.position = "bottom")rowvec <- c("family", "friends")
# associations
mat1.1 <-
df %>%
select(rowvec[1], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.2 <-
df %>%
select(rowvec[2], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
# pvalues
matp1.1 <-
df %>%
select(rowvec[1], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.2 <-
df %>%
select(rowvec[2], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
final_mat <- tibble(mat1.1, mat1.2) %>% as.matrix() %>% t()
final_pmat <- tibble(matp1.1, matp1.2) %>% as.matrix() %>% t()
colnames(final_mat) <- sorting_qs
rownames(final_mat) <- rowvec
rownames(final_pmat) <- rowvec
ggcorrplot(final_mat, lab = TRUE, lab_size = 3, tl.cex = 10, p.mat = final_pmat, colors = c(cb_colors[2], "white", cb_colors[1])) +
labs(subtitle = "Sorting Questions x Trust Factor 5\n(N = 1066)") +
theme(legend.position = "bottom")rowvec <- c("family", "friends")
# associations
mat1.1 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[1], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.2 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[2], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
# pvalues
matp1.1 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[1], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.2 <-
df %>%
filter(vax_next_year %in% c(1,5)) %>%
select(rowvec[2], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
final_mat <- tibble(mat1.1, mat1.2) %>% as.matrix() %>% t()
final_pmat <- tibble(matp1.1, matp1.2) %>% as.matrix() %>% t()
colnames(final_mat) <- sorting_qs
rownames(final_mat) <- rowvec
rownames(final_pmat) <- rowvec
ggcorrplot(final_mat, lab = TRUE, lab_size = 3, tl.cex = 10, p.mat = final_pmat, colors = c(cb_colors[2], "white", cb_colors[1])) +
labs(subtitle = "Sorting Questions x Trust Factor 5\n(N = 578)") +
theme(legend.position = "bottom")rowvec <- c("family", "friends")
# associations
mat1.1 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[1], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
mat1.2 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[2], sorting_qs) %>%
cor(use = "pairwise.complete.obs") %>%
.[1, 2:22]
# pvalues
matp1.1 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[1], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
matp1.2 <-
df %>%
filter(vax_next_year %in% c(2,3,4)) %>%
select(rowvec[2], sorting_qs) %>%
cor_pmat(use = "pairwise.complete.obs") %>%
.[1, 2:22]
final_mat <- tibble(mat1.1, mat1.2) %>% as.matrix() %>% t()
final_pmat <- tibble(matp1.1, matp1.2) %>% as.matrix() %>% t()
colnames(final_mat) <- sorting_qs
rownames(final_mat) <- rowvec
rownames(final_pmat) <- rowvec
ggcorrplot(final_mat, lab = TRUE, lab_size = 3, tl.cex = 10, p.mat = final_pmat, colors = c(cb_colors[2], "white", cb_colors[1])) +
labs(subtitle = "Sorting Questions x Trust Factor 5\n(N = 488)") +
theme(legend.position = "bottom")