library(tidyverse)
library(readxl)
library(rstatix)
library(knitr)
library(kableExtra)
library(ggcorrplot)
library(patchwork)
select <- dplyr::select
filter <- dplyr::filter
# ── Vectores de variables ──────────────────────────────────────────
todos_nombres <- c(
"id","edad","genero","formacion","experiencia","ambito","regimen","tipologia",
"con_propio","con_centro","importancia",
"sup_ecologismo","sup_pacifismo","sup_feminismo",
"sup_der_hum","sup_lgtbiq","sup_antirac","sup_anticap",
"conoc_genero","conoc_paz","conoc_derechos",
"conoc_just_eco","conoc_just_amb","conoc_intercult","conoc_tecnologia",
"trab_genero","trab_paz","trab_derechos",
"trab_just_eco","trab_just_amb","trab_intercult","trab_tecnologia",
"dif_genero","dif_paz","dif_derechos",
"dif_just_eco","dif_just_amb","dif_intercult","dif_tecnologia",
"int_genero","int_paz","int_derechos",
"int_just_eco","int_just_amb","int_intercult","int_tecnologia"
)
movimientos <- c("sup_ecologismo","sup_pacifismo","sup_feminismo",
"sup_der_hum","sup_lgtbiq","sup_antirac","sup_anticap")
etiq_mov <- c("Ecologismo","Pacifismo","Feminismo",
"Derechos humanos","LGTBIQ+","Antirracismo","Anticapitalismo")
vars_trab <- c("trab_genero","trab_paz","trab_derechos",
"trab_just_eco","trab_just_amb","trab_intercult","trab_tecnologia")
etiq_tematica <- c("Género y feminismos","Cultura de paz","Derechos humanos",
"Justicia econ. y social","Justicia ambiental",
"Interculturalidad","Crít. tecnología")
cols_numericas <- c(
"con_propio","con_centro","importancia",
"sup_ecologismo","sup_pacifismo","sup_feminismo",
"sup_der_hum","sup_lgtbiq","sup_antirac","sup_anticap",
"conoc_genero","conoc_paz","conoc_derechos",
"conoc_just_eco","conoc_just_amb","conoc_intercult","conoc_tecnologia",
"int_genero","int_paz","int_derechos",
"int_just_eco","int_just_amb","int_intercult","int_tecnologia"
)
# ── Colores ────────────────────────────────────────────────────────
azul1 <- "#1A5276"; azul2 <- "#2471A3"; azul3 <- "#5DADE2"
azul4 <- "#AED6F1"; azul5 <- "#D6EAF8"
naranja <- "#CA6F1E"; verde <- "#1E8449"
col_fem <- "#5DADE2"; col_mas <- "#1A5276"
# ── Tema ggplot ────────────────────────────────────────────────────
tema_epjg <- theme_minimal(base_size = 11) +
theme(
plot.title = element_text(face = "bold", colour = azul1, size = 12),
plot.subtitle = element_text(colour = azul2, size = 10),
axis.title = element_text(colour = azul2, size = 9),
axis.text = element_text(colour = "#333333", size = 8),
strip.background = element_rect(fill = azul5, colour = NA),
strip.text = element_text(face = "bold", colour = azul1, size = 9),
legend.position = "bottom",
panel.grid.minor = element_blank()
)
# ── Función estrellas ──────────────────────────────────────────────
estrellas <- function(p) {
case_when(p < .001 ~ "***", p < .01 ~ "**",
p < .05 ~ "*", TRUE ~ "ns")
}
limpiar_genero_cat <- function(x) {
case_when(x == "Femení" ~ "Femenino",
x == "Masculí" ~ "Masculino",
TRUE ~ "Prefiere no responder")
}
limpiar_genero_esp <- function(x) {
case_when(x == "Femenino" ~ "Femenino",
x == "Masculino" ~ "Masculino",
TRUE ~ "Prefiere no responder")
}
limpiar_trab <- function(x) {
x_chr <- str_trim(as.character(x))
case_when(
str_detect(x_chr, regex("^s[ií]$", ignore_case = TRUE)) ~ "Sí",
str_detect(x_chr, regex("^no$", ignore_case = TRUE)) ~ "No",
str_detect(x_chr, regex("marcad|selec", ignore_case = TRUE)) ~ "Sí",
x_chr == "1" ~ "Sí",
x_chr == "0" ~ "No",
x_chr == "TRUE" ~ "Sí",
x_chr == "FALSE" ~ "No",
TRUE ~ NA_character_
)
}
raw_cat <- read_excel("Cataluña Professió Docent i Justícia Global (1-538).xlsx")
raw_esp <- read_excel("ESPAÑA Profesión Docente y Justicia Global (2)(1-483).xlsx") %>%
slice(-1)
cat_df <- raw_cat[, c(1, 8, 9, 10, 14, 15, 17, 18, 19, 20, 21,
23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 39,
40, 41, 42, 43, 44, 45, 49,
50, 51, 52, 53, 54, 55, 59,
60, 61, 62, 63, 64, 65, 69)] %>%
set_names(todos_nombres) %>%
mutate(
id = as.character(id),
genero = limpiar_genero_cat(genero),
edad = suppressWarnings(as.numeric(edad)),
edad = ifelse(edad > 100, NA_real_, edad),
across(all_of(cols_numericas), ~suppressWarnings(as.numeric(.))),
across(all_of(vars_trab), limpiar_trab)
)
esp_df <- raw_esp[, c(1, 8, 9, 10, 14, 15, 18, 19, 20, 21, 22,
24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 40,
41, 42, 43, 44, 45, 46, 50,
51, 52, 53, 54, 55, 56, 60,
61, 62, 63, 64, 65, 66, 70)] %>%
set_names(todos_nombres) %>%
mutate(
id = as.character(id),
genero = limpiar_genero_esp(genero),
edad = suppressWarnings(as.numeric(edad)),
edad = ifelse(edad > 100, NA_real_, edad),
across(all_of(cols_numericas), ~suppressWarnings(as.numeric(.))),
across(all_of(vars_trab), limpiar_trab)
)
df <- bind_rows(cat_df, esp_df) %>%
mutate(
genero = factor(genero,
levels = c("Femenino","Masculino","Prefiere no responder")),
grupo_edad = cut(edad, breaks = c(0, 29, 39, 49, Inf),
labels = c("< 30 años","30–39 años","40–49 años","≥ 50 años")),
idx_sup = rowMeans(dplyr::select(., all_of(movimientos)), na.rm = TRUE),
n_trab = rowSums(
dplyr::across(all_of(vars_trab), ~ .x == "Sí"),
na.rm = TRUE
)
)
cat("**N total:**", nrow(df), "\n")
## **N total:** 1020
cat("Femenino:", sum(df$genero=="Femenino", na.rm=TRUE),
"| Masculino:", sum(df$genero=="Masculino", na.rm=TRUE),
"| No informa:", sum(df$genero=="Prefiere no responder", na.rm=TRUE))
## Femenino: 671 | Masculino: 291 | No informa: 58
Diagnóstico de variables
Apoyo a
movimientos
map_dfr(seq_along(movimientos), function(i) {
x <- df[[movimientos[i]]]
tibble(
Causa = etiq_mov[i],
Tipo = class(x),
`n válidos` = sum(!is.na(x)),
`n NA` = sum(is.na(x)),
`Valores únicos` = paste(sort(unique(x[!is.na(x)])), collapse=", ")
)
}) %>%
kable(caption = "Diagnóstico: apoyo a movimientos") %>%
kable_styling(bootstrap_options = c("striped","hover"), full_width = FALSE)
Diagnóstico: apoyo a movimientos
|
Causa
|
Tipo
|
n válidos
|
n NA
|
Valores únicos
|
|
Ecologismo
|
numeric
|
981
|
39
|
1, 2, 3, 4, 5
|
|
Pacifismo
|
numeric
|
981
|
39
|
1, 2, 3, 4, 5
|
|
Feminismo
|
numeric
|
981
|
39
|
1, 2, 3, 4, 5
|
|
Derechos humanos
|
numeric
|
981
|
39
|
1, 2, 3, 4, 5
|
|
LGTBIQ+
|
numeric
|
981
|
39
|
1, 2, 3, 4, 5
|
|
Antirracismo
|
numeric
|
981
|
39
|
1, 2, 3, 4, 5
|
|
Anticapitalismo
|
numeric
|
981
|
39
|
1, 2, 3, 4, 5
|
Trabajo en el
aula
map_dfr(seq_along(vars_trab), function(i) {
x <- df[[vars_trab[i]]]
tab <- table(x, useNA = "always")
tibble(
Temática = etiq_tematica[i],
`n Sí` = as.integer(tab["Sí"]),
`n No` = as.integer(tab["No"]),
`n NA` = as.integer(tab[is.na(names(tab))]),
`Otros valores` = paste(
setdiff(names(tab), c("Sí","No",NA)), collapse = ", "
)
)
}) %>%
kable(caption = "Diagnóstico: trabajo en el aula") %>%
kable_styling(bootstrap_options = c("striped","hover"), full_width = FALSE)
Diagnóstico: trabajo en el aula
|
Temática
|
n Sí
|
n No
|
n NA
|
Otros valores
|
|
Género y feminismos
|
754
|
227
|
39
|
|
|
Cultura de paz
|
810
|
171
|
39
|
|
|
Derechos humanos
|
691
|
290
|
39
|
|
|
Justicia econ. y social
|
489
|
492
|
39
|
|
|
Justicia ambiental
|
631
|
350
|
39
|
|
|
Interculturalidad
|
792
|
189
|
39
|
|
|
Crít. tecnología
|
595
|
386
|
39
|
|
Apoyo a
movimientos sociales
Descriptivos
globales
desc_mov <- map_dfr(seq_along(movimientos), function(i) {
x <- df[[movimientos[i]]]
x <- x[!is.na(x)]
tibble(
Causa = etiq_mov[i],
n = length(x),
M = round(mean(x), 2),
DT = round(sd(x), 2),
Md = round(median(x), 1),
Q1 = round(quantile(x,.25), 1),
Q3 = round(quantile(x,.75), 1),
`% bajo (1-2)` = round(mean(x <= 2)*100, 1),
`% medio (3)` = round(mean(x == 3)*100, 1),
`% alto (4-5)` = round(mean(x >= 4)*100, 1)
)
}) %>% arrange(desc(M))
desc_mov %>%
kable(caption = "Descriptivos: apoyo a movimientos sociales (escala 1–5)") %>%
kable_styling(bootstrap_options = c("striped","hover"), full_width = FALSE)
Descriptivos: apoyo a movimientos sociales (escala 1–5)
|
Causa
|
n
|
M
|
DT
|
Md
|
Q1
|
Q3
|
% bajo (1-2)
|
% medio (3)
|
% alto (4-5)
|
|
Antirracismo
|
981
|
4.69
|
0.71
|
5
|
5
|
5
|
2.1
|
4.5
|
93.4
|
|
Derechos humanos
|
981
|
4.68
|
0.71
|
5
|
5
|
5
|
2.0
|
4.9
|
93.1
|
|
Pacifismo
|
981
|
4.62
|
0.76
|
5
|
4
|
5
|
2.5
|
5.5
|
91.9
|
|
LGTBIQ+
|
981
|
4.37
|
0.97
|
5
|
4
|
5
|
6.0
|
9.8
|
84.2
|
|
Ecologismo
|
981
|
4.36
|
0.91
|
5
|
4
|
5
|
4.2
|
11.5
|
84.3
|
|
Feminismo
|
981
|
4.36
|
0.99
|
5
|
4
|
5
|
6.0
|
10.9
|
83.1
|
|
Anticapitalismo
|
981
|
3.82
|
1.23
|
4
|
3
|
5
|
15.0
|
20.4
|
64.6
|
desc_mov %>%
mutate(Causa = fct_reorder(Causa, M)) %>%
ggplot(aes(x = Causa, y = M)) +
geom_col(fill = azul2, width = 0.7) +
geom_errorbar(aes(ymin = M-DT, ymax = M+DT), width = 0.25, colour = azul1) +
geom_text(aes(label = round(M,2)), hjust = -0.3, size = 3.2, colour = azul1) +
scale_y_continuous(limits = c(0,6.5), breaks = 1:5) +
coord_flip() +
labs(title = "Apoyo a movimientos sociales",
subtitle = "Media ± DT (escala 1–5)", x = NULL, y = "Puntuación media") +
tema_epjg

Distribución por
categoría
map_dfr(seq_along(movimientos), function(i) {
x <- df[[movimientos[i]]]
x <- x[!is.na(x)]
tab <- table(factor(x, levels = 1:5))
tibble(
Causa = etiq_mov[i],
`1` = as.integer(tab[1]),
`2` = as.integer(tab[2]),
`3` = as.integer(tab[3]),
`4` = as.integer(tab[4]),
`5` = as.integer(tab[5]),
`% 1-2` = round((as.integer(tab[1])+as.integer(tab[2]))/length(x)*100,1),
`% 3` = round(as.integer(tab[3])/length(x)*100, 1),
`% 4-5` = round((as.integer(tab[4])+as.integer(tab[5]))/length(x)*100,1)
)
}) %>% arrange(desc(`% 4-5`)) %>%
kable(caption = "Distribución por categoría de respuesta") %>%
kable_styling(bootstrap_options = c("striped","hover"), full_width = FALSE)
Distribución por categoría de respuesta
|
Causa
|
1
|
2
|
3
|
4
|
5
|
% 1-2
|
% 3
|
% 4-5
|
|
Antirracismo
|
12
|
9
|
44
|
142
|
774
|
2.1
|
4.5
|
93.4
|
|
Derechos humanos
|
10
|
10
|
48
|
148
|
765
|
2.0
|
4.9
|
93.1
|
|
Pacifismo
|
12
|
13
|
54
|
179
|
723
|
2.5
|
5.5
|
91.9
|
|
Ecologismo
|
18
|
23
|
113
|
261
|
566
|
4.2
|
11.5
|
84.3
|
|
LGTBIQ+
|
26
|
33
|
96
|
226
|
600
|
6.0
|
9.8
|
84.2
|
|
Feminismo
|
28
|
31
|
107
|
205
|
610
|
6.0
|
10.9
|
83.1
|
|
Anticapitalismo
|
67
|
80
|
200
|
247
|
387
|
15.0
|
20.4
|
64.6
|
Correlaciones entre
movimientos
df_corr_mov <- df %>%
dplyr::select(all_of(movimientos)) %>%
drop_na()
colnames(df_corr_mov) <- etiq_mov
mat_r <- cor(df_corr_mov, method = "spearman")
mat_p <- cor_pmat(df_corr_mov, method = "spearman")
ggcorrplot(mat_r, p.mat = mat_p, lab = TRUE, lab_size = 3,
type = "lower", insig = "blank",
colors = c(naranja,"white",azul1),
title = "Correlaciones Spearman entre movimientos sociales") +
tema_epjg

# Tabla
grid_mov_mov <- expand_grid(i=seq_along(movimientos), j=seq_along(movimientos)) %>%
filter(i < j)
tab_mov_mov <- pmap_dfr(grid_mov_mov, function(i, j) {
d <- df %>% filter(!is.na(.data[[movimientos[i]]]),
!is.na(.data[[movimientos[j]]]))
ct <- cor.test(d[[movimientos[i]]], d[[movimientos[j]]],
method="spearman", exact=FALSE)
tibble(Causa1=etiq_mov[i], Causa2=etiq_mov[j],
n=nrow(d), rho=round(ct$estimate,3), p=ct$p.value)
}) %>%
mutate(p.adj=p.adjust(p,"BH"), Sig=estrellas(p.adj),
across(c(p,p.adj),~round(.,4))) %>%
arrange(desc(rho))
filas_sig_mov <- which(tab_mov_mov$Sig %in% c("*","**","***"))
tab_mov_mov %>%
kable(caption="Correlaciones entre movimientos (Spearman, BH)") %>%
kable_styling(bootstrap_options=c("striped","hover"), full_width=FALSE) %>%
row_spec(filas_sig_mov, background="#EBF5FB")
Correlaciones entre movimientos (Spearman, BH)
|
Causa1
|
Causa2
|
n
|
rho
|
p
|
p.adj
|
Sig
|
|
Derechos humanos
|
Antirracismo
|
981
|
0.696
|
0
|
0
|
***
|
|
Feminismo
|
LGTBIQ+
|
981
|
0.666
|
0
|
0
|
***
|
|
Pacifismo
|
Derechos humanos
|
981
|
0.622
|
0
|
0
|
***
|
|
Pacifismo
|
Antirracismo
|
981
|
0.588
|
0
|
0
|
***
|
|
Feminismo
|
Derechos humanos
|
981
|
0.561
|
0
|
0
|
***
|
|
Feminismo
|
Antirracismo
|
981
|
0.548
|
0
|
0
|
***
|
|
Feminismo
|
Anticapitalismo
|
981
|
0.548
|
0
|
0
|
***
|
|
LGTBIQ+
|
Antirracismo
|
981
|
0.548
|
0
|
0
|
***
|
|
Ecologismo
|
Pacifismo
|
981
|
0.546
|
0
|
0
|
***
|
|
LGTBIQ+
|
Anticapitalismo
|
981
|
0.539
|
0
|
0
|
***
|
|
Ecologismo
|
Feminismo
|
981
|
0.515
|
0
|
0
|
***
|
|
Ecologismo
|
Derechos humanos
|
981
|
0.512
|
0
|
0
|
***
|
|
Derechos humanos
|
LGTBIQ+
|
981
|
0.512
|
0
|
0
|
***
|
|
Pacifismo
|
Feminismo
|
981
|
0.511
|
0
|
0
|
***
|
|
Ecologismo
|
Anticapitalismo
|
981
|
0.508
|
0
|
0
|
***
|
|
Pacifismo
|
LGTBIQ+
|
981
|
0.502
|
0
|
0
|
***
|
|
Ecologismo
|
LGTBIQ+
|
981
|
0.489
|
0
|
0
|
***
|
|
Ecologismo
|
Antirracismo
|
981
|
0.481
|
0
|
0
|
***
|
|
Antirracismo
|
Anticapitalismo
|
981
|
0.465
|
0
|
0
|
***
|
|
Derechos humanos
|
Anticapitalismo
|
981
|
0.444
|
0
|
0
|
***
|
|
Pacifismo
|
Anticapitalismo
|
981
|
0.410
|
0
|
0
|
***
|
Por género
(Mann-Whitney)
res_gen_mov <- map_dfr(seq_along(movimientos), function(i) {
var <- movimientos[i]
d <- df %>%
filter(genero %in% c("Femenino","Masculino"), !is.na(.data[[var]])) %>%
mutate(genero = droplevels(factor(genero)))
g_F <- d %>% filter(genero=="Femenino") %>% pull(all_of(var))
g_M <- d %>% filter(genero=="Masculino") %>% pull(all_of(var))
if (length(g_F)<3 | length(g_M)<3) return(NULL)
wt <- wilcox.test(g_F, g_M, exact=FALSE)
N <- length(g_F)+length(g_M)
mu_W <- length(g_F)*length(g_M)/2
sig_W <- sqrt(length(g_F)*length(g_M)*(N+1)/12)
Z <- (wt$statistic-mu_W)/sig_W
r <- round(abs(Z)/sqrt(N), 3)
tibble(Causa=etiq_mov[i],
`n Fem`=length(g_F), `Md Fem`=round(median(g_F),1), `M Fem`=round(mean(g_F),2),
`n Mas`=length(g_M), `Md Mas`=round(median(g_M),1), `M Mas`=round(mean(g_M),2),
W=round(wt$statistic,0), p=wt$p.value, r=r,
dir=ifelse(median(g_F)>median(g_M),"Mujeres > Hombres","Hombres > Mujeres"))
}) %>%
mutate(p.adj=p.adjust(p,"BH"), Sig=estrellas(p.adj),
across(c(p,p.adj),~round(.,4)))
res_gen_mov %>%
kable(caption="Mann-Whitney: apoyo × género (corrección BH)") %>%
kable_styling(bootstrap_options=c("striped","hover"), full_width=FALSE) %>%
row_spec(which(res_gen_mov$Sig %in% c("*","**","***")), background="#EBF5FB")
Mann-Whitney: apoyo × género (corrección BH)
|
Causa
|
n Fem
|
Md Fem
|
M Fem
|
n Mas
|
Md Mas
|
M Mas
|
W
|
p
|
r
|
dir
|
p.adj
|
Sig
|
|
Ecologismo
|
671
|
5
|
4.34
|
291
|
5
|
4.38
|
93858
|
0.2845
|
0.031
|
Hombres > Mujeres
|
0.4978
|
ns
|
|
Pacifismo
|
671
|
5
|
4.65
|
291
|
5
|
4.54
|
102402
|
0.1177
|
0.039
|
Hombres > Mujeres
|
0.2746
|
ns
|
|
Feminismo
|
671
|
5
|
4.44
|
291
|
5
|
4.18
|
109033
|
0.0009
|
0.093
|
Hombres > Mujeres
|
0.0063
|
**
|
|
Derechos humanos
|
671
|
5
|
4.68
|
291
|
5
|
4.68
|
97399
|
0.9357
|
0.002
|
Hombres > Mujeres
|
0.9357
|
ns
|
|
LGTBIQ+
|
671
|
5
|
4.43
|
291
|
5
|
4.21
|
107828
|
0.0031
|
0.083
|
Hombres > Mujeres
|
0.0110
|
|
|
Antirracismo
|
671
|
5
|
4.70
|
291
|
5
|
4.67
|
97932
|
0.9151
|
0.002
|
Hombres > Mujeres
|
0.9357
|
ns
|
|
Anticapitalismo
|
671
|
4
|
3.86
|
291
|
4
|
3.72
|
100359
|
0.4709
|
0.022
|
Hombres > Mujeres
|
0.6593
|
ns
|
df %>%
filter(genero %in% c("Femenino","Masculino")) %>%
dplyr::select(genero, all_of(movimientos)) %>%
pivot_longer(all_of(movimientos), names_to="var", values_to="val") %>%
filter(!is.na(val)) %>%
mutate(Causa=factor(var, levels=movimientos, labels=etiq_mov)) %>%
group_by(Causa, genero) %>%
summarise(M=mean(val), Md=median(val), .groups="drop") %>%
ggplot(aes(x=Causa, y=M, fill=genero)) +
geom_col(position=position_dodge(0.75), width=0.65, colour="white") +
scale_fill_manual(values=c("Femenino"=col_fem,"Masculino"=col_mas), name=NULL) +
scale_y_continuous(limits=c(0,5.5), breaks=1:5) +
coord_flip() +
labs(title="Apoyo a movimientos sociales por género",
subtitle="Media (escala 1–5)", x=NULL, y="Media") +
tema_epjg

Correlación con
edad
res_edad_mov <- map_dfr(seq_along(movimientos), function(i) {
var <- movimientos[i]
d <- df %>% filter(!is.na(edad), !is.na(.data[[var]]))
ct <- cor.test(d$edad, d[[var]], method="spearman", exact=FALSE)
tibble(Causa=etiq_mov[i], n=nrow(d), rho=round(ct$estimate,3), p=ct$p.value)
}) %>%
mutate(p.adj=p.adjust(p,"BH"), Sig=estrellas(p.adj),
dir=case_when(Sig=="ns"~"sin asociación",
rho>0~"↑ mayor edad, mayor apoyo",
TRUE~"↓ mayor edad, menor apoyo"),
across(c(p,p.adj),~round(.,4)))
res_edad_mov %>%
dplyr::select(Causa, n, rho, `p adj`=p.adj, Sig, dir) %>%
kable(caption="Correlación Spearman: edad × apoyo (corrección BH)") %>%
kable_styling(bootstrap_options=c("striped","hover"), full_width=FALSE) %>%
row_spec(which(res_edad_mov$Sig!="ns"), background="#EBF5FB")
Correlación Spearman: edad × apoyo (corrección BH)
|
Causa
|
n
|
rho
|
p adj
|
Sig
|
dir
|
|
Ecologismo
|
979
|
0.015
|
0.6396
|
ns
|
sin asociación
|
|
Pacifismo
|
979
|
0.034
|
0.4032
|
ns
|
sin asociación
|
|
Feminismo
|
979
|
-0.110
|
0.0021
|
**
|
↓ mayor edad, menor apoyo
|
|
Derechos humanos
|
979
|
0.029
|
0.4251
|
ns
|
sin asociación
|
|
LGTBIQ+
|
979
|
-0.119
|
0.0014
|
**
|
↓ mayor edad, menor apoyo
|
|
Antirracismo
|
979
|
0.045
|
0.2774
|
ns
|
sin asociación
|
|
Anticapitalismo
|
979
|
-0.094
|
0.0077
|
**
|
↓ mayor edad, menor apoyo
|
Por género y grupo de
edad
df %>%
filter(genero %in% c("Femenino","Masculino"), !is.na(grupo_edad)) %>%
group_by(Género=genero, `Grupo de edad`=grupo_edad) %>%
summarise(n=n(),
`M apoyo`=round(mean(idx_sup, na.rm=TRUE),2),
`Md apoyo`=round(median(idx_sup, na.rm=TRUE),2),
.groups="drop") %>%
kable(caption="Apoyo medio por género y grupo de edad") %>%
kable_styling(bootstrap_options=c("striped","hover"), full_width=FALSE)
Apoyo medio por género y grupo de edad
|
Género
|
Grupo de edad
|
n
|
M apoyo
|
Md apoyo
|
|
Femenino
|
< 30 años
|
54
|
4.67
|
4.86
|
|
Femenino
|
30–39 años
|
157
|
4.45
|
4.71
|
|
Femenino
|
40–49 años
|
216
|
4.43
|
4.71
|
|
Femenino
|
≥ 50 años
|
243
|
4.41
|
4.71
|
|
Masculino
|
< 30 años
|
16
|
4.36
|
4.71
|
|
Masculino
|
30–39 años
|
53
|
4.27
|
4.43
|
|
Masculino
|
40–49 años
|
101
|
4.47
|
4.71
|
|
Masculino
|
≥ 50 años
|
121
|
4.26
|
4.57
|
df %>%
filter(genero %in% c("Femenino","Masculino"), !is.na(grupo_edad)) %>%
dplyr::select(genero, grupo_edad, all_of(movimientos)) %>%
pivot_longer(all_of(movimientos), names_to="var", values_to="val") %>%
filter(!is.na(val)) %>%
mutate(Causa=factor(var, levels=movimientos, labels=etiq_mov)) %>%
group_by(Causa, Género=genero, `Grupo de edad`=grupo_edad) %>%
summarise(M=round(mean(val),2), .groups="drop") %>%
ggplot(aes(x=`Grupo de edad`, y=M,
colour=Género, group=Género)) +
geom_line(linewidth=0.9) +
geom_point(size=3) +
facet_wrap(~Causa, nrow=2) +
scale_colour_manual(values=c("Femenino"=col_fem,"Masculino"=col_mas)) +
scale_y_continuous(limits=c(1,5), breaks=1:5) +
labs(title="Apoyo a movimientos por género y grupo de edad",
subtitle="Media (escala 1–5)", x=NULL, y="Media") +
tema_epjg

Trabajo
en el aula
Descriptivos
globales
desc_trab <- map_dfr(seq_along(vars_trab), function(i) {
x <- df[[vars_trab[i]]]
n_si <- sum(x=="Sí", na.rm=TRUE)
n_no <- sum(x=="No", na.rm=TRUE)
n_na <- sum(is.na(x))
n_val <- n_si+n_no
tibble(Temática=etiq_tematica[i],
`n Sí`=n_si, `n No`=n_no, `n NA`=n_na,
`% Sí`=ifelse(n_val>0, round(n_si/n_val*100,1), NA),
`% No`=ifelse(n_val>0, round(n_no/n_val*100,1), NA),
`Total válido`=n_val)
}) %>% arrange(desc(`% Sí`))
desc_trab %>%
kable(caption="Uso de temáticas EpJG en el aula") %>%
kable_styling(bootstrap_options=c("striped","hover"), full_width=FALSE)
Uso de temáticas EpJG en el aula
|
Temática
|
n Sí
|
n No
|
n NA
|
% Sí
|
% No
|
Total válido
|
|
Cultura de paz
|
810
|
171
|
39
|
82.6
|
17.4
|
981
|
|
Interculturalidad
|
792
|
189
|
39
|
80.7
|
19.3
|
981
|
|
Género y feminismos
|
754
|
227
|
39
|
76.9
|
23.1
|
981
|
|
Derechos humanos
|
691
|
290
|
39
|
70.4
|
29.6
|
981
|
|
Justicia ambiental
|
631
|
350
|
39
|
64.3
|
35.7
|
981
|
|
Crít. tecnología
|
595
|
386
|
39
|
60.7
|
39.3
|
981
|
|
Justicia econ. y social
|
489
|
492
|
39
|
49.8
|
50.2
|
981
|
cat(sprintf("\nMediana temáticas trabajadas: %.1f | Media: %.2f (DT = %.2f)\n",
median(df$n_trab, na.rm=TRUE),
mean(df$n_trab, na.rm=TRUE),
sd(df$n_trab, na.rm=TRUE)))
##
## Mediana temáticas trabajadas: 5.0 | Media: 4.67 (DT = 2.14)
desc_trab %>%
mutate(Temática=fct_reorder(Temática, `% Sí`)) %>%
pivot_longer(c(`% Sí`,`% No`), names_to="Uso", values_to="pct") %>%
ggplot(aes(x=Temática, y=pct, fill=Uso)) +
geom_col(width=0.7, colour="white") +
geom_text(data=.%>%filter(Uso=="% Sí"),
aes(label=paste0(pct,"%")), hjust=-0.15, size=3.2, colour=azul1) +
scale_fill_manual(values=c("% Sí"=azul2,"% No"=azul5), name=NULL) +
scale_y_continuous(limits=c(0,115), labels=scales::percent_format(scale=1)) +
coord_flip() +
labs(title="Uso de temáticas EpJG en el aula",
subtitle="Porcentaje de docentes que trabaja cada temática",
x=NULL, y="Porcentaje") +
tema_epjg

Por género
(Chi-cuadrado)
res_gen_trab <- map_dfr(seq_along(vars_trab), function(i) {
var <- vars_trab[i]
d <- df %>%
filter(genero %in% c("Femenino","Masculino"),
!is.na(.data[[var]]), .data[[var]] %in% c("Sí","No")) %>%
mutate(genero=droplevels(factor(genero)))
tab <- table(d[[var]], d$genero)
if (any(dim(tab)<2)) return(NULL)
cs <- chisq.test(tab, correct=FALSE)
V <- sqrt(cs$statistic/(sum(tab)*(min(dim(tab))-1)))
pct_F <- round(tab["Sí","Femenino"] /sum(tab[,"Femenino"]) *100,1)
pct_M <- round(tab["Sí","Masculino"]/sum(tab[,"Masculino"])*100,1)
tibble(Temática=etiq_tematica[i],
`% Sí Fem`=pct_F, `% Sí Mas`=pct_M, `Δ pp`=round(pct_F-pct_M,1),
chi2=round(cs$statistic,2), df=cs$parameter,
p=cs$p.value, V=round(V,3))
}) %>%
mutate(p.adj=p.adjust(p,"BH"), Sig=estrellas(p.adj),
across(c(p,p.adj),~round(.,4)))
res_gen_trab %>%
kable(caption="Chi-cuadrado: trabajo en aula × género (corrección BH)") %>%
kable_styling(bootstrap_options=c("striped","hover"), full_width=FALSE) %>%
row_spec(which(res_gen_trab$Sig %in% c("*","**","***")), background="#EBF5FB")
Chi-cuadrado: trabajo en aula × género (corrección BH)
|
Temática
|
% Sí Fem
|
% Sí Mas
|
Δ pp
|
chi2
|
df
|
p
|
V
|
p.adj
|
Sig
|
|
Género y feminismos
|
81.2
|
66.0
|
15.2
|
26.32
|
1
|
0.0000
|
0.165
|
0.0000
|
***
|
|
Cultura de paz
|
86.0
|
75.3
|
10.7
|
16.38
|
1
|
0.0001
|
0.130
|
0.0001
|
***
|
|
Derechos humanos
|
71.7
|
67.4
|
4.3
|
1.83
|
1
|
0.1767
|
0.044
|
0.2061
|
ns
|
|
Justicia econ. y social
|
47.1
|
55.7
|
-8.6
|
5.97
|
1
|
0.0145
|
0.079
|
0.0204
|
|
|
Justicia ambiental
|
64.2
|
64.9
|
-0.7
|
0.05
|
1
|
0.8313
|
0.007
|
0.8313
|
ns
|
|
Interculturalidad
|
84.5
|
72.2
|
12.3
|
19.89
|
1
|
0.0000
|
0.144
|
0.0000
|
***
|
|
Crít. tecnología
|
56.5
|
69.4
|
-12.9
|
14.19
|
1
|
0.0002
|
0.121
|
0.0003
|
***
|
# N.º temáticas × género
cat("\nN.º de temáticas trabajadas por género:\n")
##
## N.º de temáticas trabajadas por género:
df %>%
filter(genero %in% c("Femenino","Masculino"), !is.na(n_trab)) %>%
group_by(genero) %>%
summarise(n=n(), M=round(mean(n_trab),2), DT=round(sd(n_trab),2),
Md=median(n_trab), .groups="drop") %>%
kable() %>%
kable_styling(bootstrap_options=c("striped","hover"), full_width=FALSE) %>%
print()
## <table class="table table-striped table-hover" style="width: auto !important; margin-left: auto; margin-right: auto;">
## <thead>
## <tr>
## <th style="text-align:left;"> genero </th>
## <th style="text-align:right;"> n </th>
## <th style="text-align:right;"> M </th>
## <th style="text-align:right;"> DT </th>
## <th style="text-align:right;"> Md </th>
## </tr>
## </thead>
## <tbody>
## <tr>
## <td style="text-align:left;"> Femenino </td>
## <td style="text-align:right;"> 671 </td>
## <td style="text-align:right;"> 4.91 </td>
## <td style="text-align:right;"> 1.83 </td>
## <td style="text-align:right;"> 5 </td>
## </tr>
## <tr>
## <td style="text-align:left;"> Masculino </td>
## <td style="text-align:right;"> 291 </td>
## <td style="text-align:right;"> 4.71 </td>
## <td style="text-align:right;"> 2.21 </td>
## <td style="text-align:right;"> 5 </td>
## </tr>
## </tbody>
## </table>
Correlación con
edad
res_edad_trab <- map_dfr(seq_along(vars_trab), function(i) {
var <- vars_trab[i]
d <- df %>%
filter(!is.na(edad), !is.na(.data[[var]]),
.data[[var]] %in% c("Sí","No")) %>%
mutate(trab_bin=if_else(.data[[var]]=="Sí",1L,0L))
ct <- cor.test(d$edad, d$trab_bin, method="spearman", exact=FALSE)
tibble(Temática=etiq_tematica[i], n=nrow(d),
rho=round(ct$estimate,3), p=ct$p.value)
}) %>%
mutate(p.adj=p.adjust(p,"BH"), Sig=estrellas(p.adj),
dir=case_when(Sig=="ns"~"sin asociación",
rho>0~"↑ mayor edad, más uso",
TRUE~"↓ mayor edad, menos uso"),
across(c(p,p.adj),~round(.,4)))
res_edad_trab %>%
dplyr::select(Temática, n, rho, `p adj`=p.adj, Sig, dir) %>%
kable(caption="Correlación Spearman: edad × trabajo en aula (corrección BH)") %>%
kable_styling(bootstrap_options=c("striped","hover"), full_width=FALSE) %>%
row_spec(which(res_edad_trab$Sig!="ns"), background="#EBF5FB")
Correlación Spearman: edad × trabajo en aula (corrección BH)
|
Temática
|
n
|
rho
|
p adj
|
Sig
|
dir
|
|
Género y feminismos
|
979
|
-0.065
|
0.0964
|
ns
|
sin asociación
|
|
Cultura de paz
|
979
|
0.011
|
0.7414
|
ns
|
sin asociación
|
|
Derechos humanos
|
979
|
0.077
|
0.0567
|
ns
|
sin asociación
|
|
Justicia econ. y social
|
979
|
0.157
|
0.0000
|
***
|
↑ mayor edad, más uso
|
|
Justicia ambiental
|
979
|
0.019
|
0.6394
|
ns
|
sin asociación
|
|
Interculturalidad
|
979
|
0.044
|
0.2401
|
ns
|
sin asociación
|
|
Crít. tecnología
|
979
|
0.046
|
0.2401
|
ns
|
sin asociación
|
# n_trab × edad
d_ntrab2 <- df %>% filter(!is.na(edad), !is.na(n_trab))
ct_ntrab <- cor.test(d_ntrab2$edad, d_ntrab2$n_trab, method="spearman", exact=FALSE)
cat(sprintf("\nCorrelación Spearman edad × n.º temáticas trabajadas: rho = %.3f, p = %.4f\n",
ct_ntrab$estimate, ct_ntrab$p.value))
##
## Correlación Spearman edad × n.º temáticas trabajadas: rho = 0.090, p = 0.0049
Por género y grupo de
edad
df %>%
filter(genero %in% c("Femenino","Masculino"), !is.na(grupo_edad)) %>%
group_by(Género=genero, `Grupo de edad`=grupo_edad) %>%
summarise(n=n(),
`M n_trab`=round(mean(n_trab, na.rm=TRUE),2),
`Md n_trab`=round(median(n_trab, na.rm=TRUE),1),
.groups="drop") %>%
kable(caption="N.º de temáticas trabajadas por género y grupo de edad") %>%
kable_styling(bootstrap_options=c("striped","hover"), full_width=FALSE)
N.º de temáticas trabajadas por género y grupo de edad
|
Género
|
Grupo de edad
|
n
|
M n_trab
|
Md n_trab
|
|
Femenino
|
< 30 años
|
54
|
4.57
|
4
|
|
Femenino
|
30–39 años
|
157
|
4.62
|
5
|
|
Femenino
|
40–49 años
|
216
|
5.02
|
5
|
|
Femenino
|
≥ 50 años
|
243
|
5.08
|
5
|
|
Masculino
|
< 30 años
|
16
|
4.94
|
5
|
|
Masculino
|
30–39 años
|
53
|
4.57
|
5
|
|
Masculino
|
40–49 años
|
101
|
4.59
|
5
|
|
Masculino
|
≥ 50 años
|
121
|
4.83
|
5
|
df %>%
filter(genero %in% c("Femenino","Masculino"), !is.na(grupo_edad)) %>%
group_by(Género=genero, `Grupo de edad`=grupo_edad) %>%
summarise(M=mean(n_trab, na.rm=TRUE), .groups="drop") %>%
ggplot(aes(x=`Grupo de edad`, y=M, colour=Género, group=Género)) +
geom_line(linewidth=1) +
geom_point(size=3.5) +
geom_text(aes(label=round(M,2)), vjust=-1, size=3) +
scale_colour_manual(values=c("Femenino"=col_fem,"Masculino"=col_mas)) +
scale_y_continuous(limits=c(0,7), breaks=0:7) +
labs(title="N.º de temáticas trabajadas en el aula por género y edad",
x=NULL, y="Media de temáticas") +
tema_epjg

Relación: apoyo a causas × trabajo en el aula
Matriz de
correlaciones
grid_ap_trab <- expand_grid(
i_mov = seq_along(movimientos),
i_trab = seq_along(vars_trab)
)
res_ap_trab <- pmap_dfr(grid_ap_trab, function(i_mov, i_trab) {
d <- df %>%
filter(!is.na(.data[[movimientos[i_mov]]]),
!is.na(.data[[vars_trab[i_trab]]]),
.data[[vars_trab[i_trab]]] %in% c("Sí","No")) %>%
mutate(trab_bin=if_else(.data[[vars_trab[i_trab]]]=="Sí",1L,0L))
ct <- cor.test(d[[movimientos[i_mov]]], d$trab_bin,
method="spearman", exact=FALSE)
tibble(Causa=etiq_mov[i_mov], Temática=etiq_tematica[i_trab],
n=nrow(d), rho=round(ct$estimate,3), p=ct$p.value)
}) %>%
mutate(p.adj=p.adjust(p,"BH"), Sig=estrellas(p.adj),
across(c(p,p.adj),~round(.,4)))
# Tabla matriz
res_ap_trab %>%
mutate(celda=if_else(Sig=="ns","—",paste0(rho,Sig))) %>%
dplyr::select(Causa, Temática, celda) %>%
pivot_wider(names_from=Temática, values_from=celda) %>%
kable(caption="Correlaciones Spearman: apoyo × trabajo en aula (—= ns, corrección BH)") %>%
kable_styling(bootstrap_options=c("striped","hover","condensed"), full_width=FALSE)
Correlaciones Spearman: apoyo × trabajo en aula (—= ns, corrección BH)
|
Causa
|
Género y feminismos
|
Cultura de paz
|
Derechos humanos
|
Justicia econ. y social
|
Justicia ambiental
|
Interculturalidad
|
Crít. tecnología
|
|
Ecologismo
|
0.133***
|
—
|
—
|
—
|
0.083*
|
—
|
—
|
|
Pacifismo
|
0.148***
|
0.115**
|
0.088*
|
—
|
—
|
0.109**
|
—
|
|
Feminismo
|
0.302***
|
0.085*
|
0.106**
|
—
|
—
|
0.092*
|
—
|
|
Derechos humanos
|
0.137***
|
0.077*
|
0.112**
|
0.084*
|
—
|
—
|
—
|
|
LGTBIQ+
|
0.224***
|
0.074*
|
0.084*
|
—
|
—
|
0.071*
|
—
|
|
Antirracismo
|
0.177***
|
—
|
0.098**
|
0.079*
|
—
|
0.1**
|
—
|
|
Anticapitalismo
|
0.211***
|
0.104**
|
0.115**
|
—
|
—
|
0.121***
|
—
|
Solo
significativas
tab_ap_trab_sig <- res_ap_trab %>%
filter(Sig != "ns") %>%
dplyr::select(Causa, Temática, n, rho, `p adj`=p.adj, Sig) %>%
arrange(desc(abs(rho)))
filas_sig_ap <- which(tab_ap_trab_sig$Sig %in% c("**","***"))
tab_ap_trab_sig %>%
kable(caption="Correlaciones significativas: apoyo × trabajo en aula") %>%
kable_styling(bootstrap_options=c("striped","hover"), full_width=FALSE) %>%
row_spec(filas_sig_ap, background="#EBF5FB")
Correlaciones significativas: apoyo × trabajo en aula
|
Causa
|
Temática
|
n
|
rho
|
p adj
|
Sig
|
|
Feminismo
|
Género y feminismos
|
981
|
0.302
|
0.0000
|
***
|
|
LGTBIQ+
|
Género y feminismos
|
981
|
0.224
|
0.0000
|
***
|
|
Anticapitalismo
|
Género y feminismos
|
981
|
0.211
|
0.0000
|
***
|
|
Antirracismo
|
Género y feminismos
|
981
|
0.177
|
0.0000
|
***
|
|
Pacifismo
|
Género y feminismos
|
981
|
0.148
|
0.0000
|
***
|
|
Derechos humanos
|
Género y feminismos
|
981
|
0.137
|
0.0001
|
***
|
|
Ecologismo
|
Género y feminismos
|
981
|
0.133
|
0.0002
|
***
|
|
Anticapitalismo
|
Interculturalidad
|
981
|
0.121
|
0.0009
|
***
|
|
Pacifismo
|
Cultura de paz
|
981
|
0.115
|
0.0015
|
**
|
|
Anticapitalismo
|
Derechos humanos
|
981
|
0.115
|
0.0015
|
**
|
|
Derechos humanos
|
Derechos humanos
|
981
|
0.112
|
0.0020
|
**
|
|
Pacifismo
|
Interculturalidad
|
981
|
0.109
|
0.0025
|
**
|
|
Feminismo
|
Derechos humanos
|
981
|
0.106
|
0.0035
|
**
|
|
Anticapitalismo
|
Cultura de paz
|
981
|
0.104
|
0.0041
|
**
|
|
Antirracismo
|
Interculturalidad
|
981
|
0.100
|
0.0056
|
**
|
|
Antirracismo
|
Derechos humanos
|
981
|
0.098
|
0.0068
|
**
|
|
Feminismo
|
Interculturalidad
|
981
|
0.092
|
0.0109
|
|
|
Pacifismo
|
Derechos humanos
|
981
|
0.088
|
0.0159
|
|
|
Feminismo
|
Cultura de paz
|
981
|
0.085
|
0.0205
|
|
|
Derechos humanos
|
Justicia econ. y social
|
981
|
0.084
|
0.0206
|
|
|
LGTBIQ+
|
Derechos humanos
|
981
|
0.084
|
0.0206
|
|
|
Ecologismo
|
Justicia ambiental
|
981
|
0.083
|
0.0206
|
|
|
Antirracismo
|
Justicia econ. y social
|
981
|
0.079
|
0.0289
|
|
|
Derechos humanos
|
Cultura de paz
|
981
|
0.077
|
0.0324
|
|
|
LGTBIQ+
|
Cultura de paz
|
981
|
0.074
|
0.0409
|
|
|
LGTBIQ+
|
Interculturalidad
|
981
|
0.071
|
0.0482
|
|
Heatmap
res_ap_trab %>%
mutate(
rho_plot = if_else(Sig=="ns", NA_real_, rho),
Causa = factor(Causa, levels=etiq_mov),
Temática = factor(Temática, levels=rev(etiq_tematica))
) %>%
ggplot(aes(x=Causa, y=Temática, fill=rho_plot)) +
geom_tile(colour="white", linewidth=0.6) +
geom_text(aes(label=if_else(Sig=="ns","",paste0(rho,Sig))),
size=2.8, colour="white", fontface="bold") +
scale_fill_gradient2(low=naranja, mid="white", high=azul1,
midpoint=0, na.value="#F2F3F4",
name="rho") +
scale_x_discrete(labels=function(x) str_wrap(x, width=10)) +
labs(title="Correlaciones: apoyo a causas × trabajo en el aula",
subtitle="Celdas grises = no significativo (corrección BH)",
x="Apoyo a causa social", y="Temática trabajada en el aula",
caption="* p < .05; ** p < .01; *** p < .001") +
theme_minimal(base_size=10) +
theme(axis.text.x = element_text(angle=30, hjust=1, size=8.5),
axis.text.y = element_text(size=8.5),
plot.title = element_text(face="bold", colour=azul1, size=11),
plot.subtitle = element_text(colour="#555555", size=9),
panel.grid = element_blank(),
legend.position = "right",
plot.caption = element_text(size=8, colour="#777777", hjust=0))

Índice global apoyo ×
n_trab
# Correlación índice global apoyo × n_trab
d_idx <- df %>% filter(!is.na(idx_sup), !is.na(n_trab))
ct_idx <- cor.test(d_idx$idx_sup, d_idx$n_trab, method="spearman", exact=FALSE)
tibble(
Variable1 = "Índice global apoyo",
Variable2 = "N.º temáticas trabajadas",
n = nrow(d_idx),
rho = round(ct_idx$estimate, 3),
p = round(ct_idx$p.value, 4),
Sig = estrellas(ct_idx$p.value)
) %>%
kable(caption="Correlación: índice global apoyo × n.º temáticas en el aula") %>%
kable_styling(bootstrap_options=c("striped","hover"), full_width=FALSE)
Correlación: índice global apoyo × n.º temáticas en el aula
|
Variable1
|
Variable2
|
n
|
rho
|
p
|
Sig
|
|
Índice global apoyo
|
N.º temáticas trabajadas
|
981
|
0.149
|
0
|
***
|
# Gráfico dispersión
df %>%
filter(!is.na(idx_sup), !is.na(n_trab)) %>%
ggplot(aes(x=idx_sup, y=n_trab)) +
geom_jitter(colour=azul4, alpha=0.3, size=1, width=0.05, height=0.15) +
geom_smooth(method="lm", colour=azul1, fill=azul5, linewidth=1, se=TRUE) +
annotate("text", x=4.5, y=6.5,
label=sprintf("rho = %.3f%s", ct_idx$estimate,
estrellas(ct_idx$p.value)),
size=4, colour=azul1, fontface="bold") +
scale_x_continuous(limits=c(1,5), breaks=1:5) +
scale_y_continuous(breaks=0:7) +
labs(title="Relación entre apoyo global a causas y uso en el aula",
subtitle=sprintf("Spearman rho = %.3f, p = %.4f · N = %d",
ct_idx$estimate, ct_idx$p.value, nrow(d_idx)),
x="Índice global de apoyo a causas (1–5)",
y="N.º de temáticas trabajadas en el aula (0–7)") +
tema_epjg

Por temática
coincidente
# Apoyo a la causa relacionada × uso de la misma temática en aula
pares_coincidentes <- tibble(
mov = movimientos,
trab = vars_trab,
etiq_m = etiq_mov,
etiq_t = etiq_tematica
)
res_coincidente <- pmap_dfr(pares_coincidentes, function(mov, trab, etiq_m, etiq_t) {
d <- df %>%
filter(!is.na(.data[[mov]]),
!is.na(.data[[trab]]),
.data[[trab]] %in% c("Sí","No")) %>%
mutate(trab_bin=if_else(.data[[trab]]=="Sí",1L,0L))
g_si <- d %>% filter(trab_bin==1) %>% pull(all_of(mov))
g_no <- d %>% filter(trab_bin==0) %>% pull(all_of(mov))
if (length(g_si)<3 | length(g_no)<3) return(NULL)
wt <- wilcox.test(g_si, g_no, exact=FALSE)
N <- length(g_si)+length(g_no)
mu_W <- length(g_si)*length(g_no)/2
sig_W <- sqrt(length(g_si)*length(g_no)*(N+1)/12)
Z <- (wt$statistic-mu_W)/sig_W
r <- round(abs(Z)/sqrt(N), 3)
tibble(
Temática = etiq_t,
`n Sí` = length(g_si),
`Md Sí` = round(median(g_si),1),
`M Sí` = round(mean(g_si),2),
`n No` = length(g_no),
`Md No` = round(median(g_no),1),
`M No` = round(mean(g_no),2),
W = round(wt$statistic,0),
p = wt$p.value,
r = r,
dir = ifelse(median(g_si)>median(g_no),
"Mayor apoyo → usa en aula",
"Menor apoyo → usa en aula")
)
}) %>%
mutate(p.adj=p.adjust(p,"BH"), Sig=estrellas(p.adj),
across(c(p,p.adj),~round(.,4)))
res_coincidente %>%
kable(caption="Mann-Whitney: apoyo a causa × uso de la misma temática en aula (BH)") %>%
kable_styling(bootstrap_options=c("striped","hover"), full_width=FALSE) %>%
row_spec(which(res_coincidente$Sig %in% c("*","**","***")), background="#EBF5FB")
Mann-Whitney: apoyo a causa × uso de la misma temática en aula (BH)
|
Temática
|
n Sí
|
Md Sí
|
M Sí
|
n No
|
Md No
|
M No
|
W
|
p
|
r
|
dir
|
p.adj
|
Sig
|
|
Género y feminismos
|
754
|
5
|
4.44
|
227
|
4
|
4.10
|
99426
|
0.0000
|
0.118
|
Mayor apoyo → usa en aula
|
0.0002
|
***
|
|
Cultura de paz
|
810
|
5
|
4.66
|
171
|
5
|
4.42
|
78609
|
0.0003
|
0.089
|
Menor apoyo → usa en aula
|
0.0011
|
**
|
|
Derechos humanos
|
691
|
5
|
4.43
|
290
|
5
|
4.22
|
111790
|
0.0009
|
0.091
|
Menor apoyo → usa en aula
|
0.0022
|
**
|
|
Justicia econ. y social
|
489
|
5
|
4.73
|
492
|
5
|
4.63
|
128734
|
0.0085
|
0.061
|
Menor apoyo → usa en aula
|
0.0119
|
|
|
Justicia ambiental
|
631
|
5
|
4.38
|
350
|
5
|
4.35
|
109884
|
0.8839
|
0.004
|
Menor apoyo → usa en aula
|
0.8839
|
ns
|
|
Interculturalidad
|
792
|
5
|
4.73
|
189
|
5
|
4.51
|
82630
|
0.0018
|
0.071
|
Menor apoyo → usa en aula
|
0.0031
|
**
|
|
Crít. tecnología
|
595
|
4
|
3.86
|
386
|
4
|
3.77
|
118044
|
0.4387
|
0.024
|
Menor apoyo → usa en aula
|
0.5118
|
ns
|
Resumen de resultados
principales
# Tabla resumen por bloque
bind_rows(
tibble(Bloque="Apoyo × Género",
Resultado=sprintf("%d/%d causas significativas (BH)",
sum(res_gen_mov$Sig!="ns"),
nrow(res_gen_mov))),
tibble(Bloque="Apoyo × Edad",
Resultado=sprintf("%d/%d causas con asociación significativa (BH)",
sum(res_edad_mov$Sig!="ns"),
nrow(res_edad_mov))),
tibble(Bloque="Trabajo en aula × Género",
Resultado=sprintf("%d/%d temáticas con diferencias significativas (BH)",
sum(res_gen_trab$Sig!="ns"),
nrow(res_gen_trab))),
tibble(Bloque="Trabajo en aula × Edad",
Resultado=sprintf("%d/%d temáticas con asociación significativa (BH)",
sum(res_edad_trab$Sig!="ns"),
nrow(res_edad_trab))),
tibble(Bloque="Apoyo × Trabajo en aula",
Resultado=sprintf("%d/%d pares causa-temática con correlación significativa (BH)",
sum(res_ap_trab$Sig!="ns"),
nrow(res_ap_trab))),
tibble(Bloque="Apoyo causa propia × uso en aula",
Resultado=sprintf("%d/%d pares coincidentes significativos (BH)",
sum(res_coincidente$Sig!="ns"),
nrow(res_coincidente)))
) %>%
kable(caption="Resumen de resultados por bloque de análisis") %>%
kable_styling(bootstrap_options=c("striped","hover"), full_width=FALSE)
Resumen de resultados por bloque de análisis
|
Bloque
|
Resultado
|
|
Apoyo × Género
|
2/7 causas significativas (BH)
|
|
Apoyo × Edad
|
3/7 causas con asociación significativa (BH)
|
|
Trabajo en aula × Género
|
5/7 temáticas con diferencias significativas (BH)
|
|
Trabajo en aula × Edad
|
1/7 temáticas con asociación significativa (BH)
|
|
Apoyo × Trabajo en aula
|
26/49 pares causa-temática con correlación significativa (BH)
|
|
Apoyo causa propia × uso en aula
|
5/7 pares coincidentes significativos (BH)
|