syn_lang_syn <- syn_data |>
dplyr::filter(syn_graph_col == "Yes") |>
dplyr::pull(scsq_language)
syn_lang_nonsyn <- syn_data |>
dplyr::filter(syn_graph_col == "No") |>
dplyr::pull(scsq_language)
n_syn <- length(syn_lang_syn)
n_nonsyn <- length(syn_lang_nonsyn)
sd_syn <- sd(syn_lang_syn, na.rm = TRUE)
sd_nonsyn <- sd(syn_lang_nonsyn, na.rm = TRUE)
sd_pooled <- (((n_syn - 1)*(sd_syn^2)) + ((n_nonsyn - 1)*(sd_nonsyn^2)))/(n_syn + n_nonsyn + 2)
mdiff_se <- sqrt((sd_pooled/n_syn) + (sd_pooled/n_nonsyn))
mdiff_se
[1] 0.1151723