# Astea sunt datele scoase din taskul cu aranjarea screenshoturilor din filmul vizionat la SEM. Sunt aici toti participantii, si cei tineri, care nu au facut EEG (extensia lor de la ID este semc), si cei varstnici, care au si EEG (extensia lor e doar sem). Am adaugat in id si referinte la conditia experimentala, astfel ca cei care au ns in id au facut non-social (vizionat film singuri, fara sa faca Oglina), cei cu n sunt in conditia neutra (vizionat film cu o persoana straina alaturi, fara sa fi facut oglinda) si cei cu p au facut condizia pozitiva social (Oglinda si vizionarea filmului alaturi de instructor). Asa ca, de ex, al 10lea participant din lotul comportamental de tineri care a fost in grupul pozitiv social arata cam asa: 7semc p .
# In fisier gasesti datele scoase de computer in prima fila si pe a doua fila ai si genurile si varstele pt fiecare id. Sunt in ordinea cronologica, nu numerica. In prima fila am lasat si doua inregistrari facute ca probe pt ca mai aveau in partea din dreapta a tabelului niste date, ma gandesc ca poate au legatura cu modul de scorare, asa ca nu le-am sters.
<- ".*semc.*"
ids_pattern_young <- "^(?=.*sem)(?!.*semc).*$"
ids_pattern_old
# Stad
<- rio::import("taskmaginiSEM.xlsx", which = "Varsta-Gen")
demo_df $id <- tolower(trimws(demo_df$id))
demo_dfsum(duplicated(demo_df$id)) == 0
[1] TRUE
<- rio::import("taskmaginiSEM.xlsx", which = "stad")
stad_df $id <- tolower(trimws(stad_df$id))
stad_df
<-
stad_df %>%
stad_df select(-varsta, -gen) %>%
left_join(demo_df, by = "id") %>%
mutate(
young = stringr::str_detect(id, ids_pattern_young),
old = stringr::str_detect(id, ids_pattern_old)
%>%
) separate(id, into = c("id2", "cond"), sep = " ", remove = FALSE) %>%
relocate(id, cond, varsta, gen, everything()) %>%
group_by(id) %>%
mutate(trial_cycl = cumsum(c(1, diff(trialNo) < 0))) %>%
ungroup() %>%
relocate(trial_cycl, .after = trialNo) %>%
rowwise() %>%
mutate(
score = sum(
== chosen1,
correct1 == chosen2,
correct2 == chosen3,
correct3 == chosen4,
correct4 == chosen5
correct5
)
)
# stad_df %>%
# filter(trial_cycl == 2) %>%
# print(n = Inf)
%>%
stad_df count(id, cond, varsta, gen) %>%
print(n = Inf)
%>%
stad_df filter(old) %>%
group_by(id, cond) %>%
summarise(score = sum(score)) %>%
ungroup() %>%
::ggbetweenstats(
ggstatsplotx = cond,
y = score,
outlier.label = id,
type = "np",
title = "Elderly"
)
%>%
stad_df filter(young) %>%
group_by(id, cond) %>%
summarise(score = sum(score)) %>%
ungroup() %>%
::ggbetweenstats(
ggstatsplotx = cond,
y = score,
outlier.label = id,
type = "np",
title = "General Sample"
)
%>%
stad_df filter(old) %>%
group_by(id, cond) %>%
summarise(score = sum(score)) %>%
ungroup() %>%
::ggbetweenstats(
ggstatsplotx = cond,
y = score,
outlier.label = id,
type = "p",
title = "Elderly"
)
%>%
stad_df filter(young) %>%
group_by(id, cond) %>%
summarise(score = sum(score)) %>%
ungroup() %>%
::ggbetweenstats(
ggstatsplotx = cond,
y = score,
outlier.label = id,
type = "p",
title = "General Sample"
)
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8.1 x64 (build 9600)
Matrix products: default
locale:
[1] LC_COLLATE=Romanian_Romania.1252 LC_CTYPE=Romanian_Romania.1252 LC_MONETARY=Romanian_Romania.1252
[4] LC_NUMERIC=C LC_TIME=Romanian_Romania.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] report_0.5.7 ggpubr_0.6.0 ggstatsplot_0.11.0.9000 psych_2.3.3
[5] lubridate_1.9.2 forcats_1.0.0 stringr_1.5.0 dplyr_1.1.1
[9] purrr_1.0.1 readr_2.1.4 tidyr_1.3.0 tibble_3.2.1
[13] ggplot2_3.4.2 tidyverse_2.0.0 rio_0.5.29 conflicted_1.2.0
[17] fs_1.6.1 papaja_0.1.1 tinylabels_0.2.3 pacman_0.5.3
loaded via a namespace (and not attached):
[1] readxl_1.4.2 backports_1.4.1 workflows_1.1.3 splines_4.2.2
[5] gmp_0.7-1 listenv_0.9.0 kSamples_1.2-9 rstantools_2.3.1
[9] SuppDists_1.1-9.7 digest_0.6.31 foreach_1.5.2 htmltools_0.5.5
[13] yardstick_1.1.0 parsnip_1.0.4 fansi_1.0.4 magrittr_2.0.3
[17] memoise_2.0.1 tune_1.1.0 paletteer_1.5.0 tzdb_0.4.0
[21] openxlsx_4.2.5.2 recipes_1.0.5 globals_0.16.2 modelr_0.1.11
[25] gower_1.0.1 RcppParallel_5.1.7 hardhat_1.3.0 timechange_0.2.0
[29] rsample_1.1.1 dials_1.2.0 colorspace_2.1-0 ggrepel_0.9.3
[33] haven_2.5.2 xfun_0.38 prismatic_1.1.1 crayon_1.5.2
[37] jsonlite_1.8.4 lme4_1.1-33 zeallot_0.1.0 survival_3.4-0
[41] iterators_1.0.14 glue_1.6.2 gtable_0.3.3 ipred_0.9-14
[45] emmeans_1.8.6 MatrixModels_0.5-1 sjstats_0.18.2 sjmisc_2.8.9
[49] statsExpressions_1.5.0 car_3.1-2 Rmpfr_0.9-1 future.apply_1.10.0
[53] abind_1.4-5 scales_1.2.1 mvtnorm_1.1-3 PMCMRplus_1.9.6
[57] rstatix_0.7.2 ggeffects_1.2.2 Rcpp_1.0.10 xtable_1.8-4
[61] performance_0.10.3 GPfit_1.0-8 foreign_0.8-83 lava_1.7.2.1
[65] prodlim_2023.03.31 datawizard_0.7.1 farver_2.1.1 pkgconfig_2.0.3
[69] multcompView_0.1-8 sass_0.4.6 nnet_7.3-18 here_1.0.1
[73] utf8_1.2.3 labeling_0.4.2 tidyselect_1.2.0 rlang_1.1.0
[77] DiceDesign_1.9 effectsize_0.8.3 munsell_0.5.0 cellranger_1.1.0
[81] tools_4.2.2 cachem_1.0.6 cli_3.6.1 generics_0.1.3
[85] sjlabelled_1.2.0 broom_1.0.4 evaluate_0.21 fastmap_1.1.0
[89] BWStest_0.2.2 yaml_2.3.7 rematch2_2.1.2 knitr_1.42
[93] zip_2.2.2 pbapply_1.7-0 future_1.32.0 nlme_3.1-160
[97] leaps_3.1 xml2_1.3.3 correlation_0.8.4 compiler_4.2.2
[101] rstudioapi_0.14 curl_5.0.0 ggsignif_0.6.4 gt_0.9.0
[105] lhs_1.1.6 bslib_0.4.2 stringi_1.7.12 parameters_0.21.0
[109] lattice_0.20-45 Matrix_1.5-1 nloptr_2.0.3 vctrs_0.6.2
[113] pillar_1.9.0 lifecycle_1.0.3 furrr_0.3.1 jquerylib_0.1.4
[117] estimability_1.4.1 data.table_1.14.8 insight_0.19.1 patchwork_1.1.2
[121] R6_2.5.1 backpipe_0.2.3 BayesFactor_0.9.12-4.4 parallelly_1.35.0
[125] codetools_0.2-18 boot_1.3-28.1 MASS_7.3-58.1 rprojroot_2.0.3
[129] withr_2.5.0 mnormt_2.1.1 bayestestR_0.13.1 parallel_4.2.2
[133] hms_1.1.3 grid_4.2.2 rpart_4.1.19 timeDate_4022.108
[137] sjPlot_2.8.14 coda_0.19-4 class_7.3-20 minqa_1.2.5
[141] rmarkdown_2.22 carData_3.0-5 usemodels_0.2.0.9000
A work by Claudiu Papasteri