N.Y. *** NOTE *** The comments in this markdown file were my made by Carina for a previous verison of the analyses. Only the R outputs are up to date with the recent data.
## Number of SDAM participants from demo: 11017
## Number of non-SDAM participants from demo: 4935
## Number of SDAM participants from flup: 1885
## Number of non-SDAM participants flup: 1287
The data file I used is in wide format with everyone from demo &
follow-up in the same file. Columns beginning with dem are
from the demo and columns beginning with fup are from the
follow-up. If a participant completed both surveys, they’ll have data in
all the columns. If they only completed one survey, they’ll only have
data in one set of columns.
Note that I’ve excluded people who say they have HSAM, but I have not excluded people who completed both demo & follow-up but who endorsed SDAM on only one of those surveys. We will need to decide how to handle those people.
Stuff off the top of my head that still need to be looked at:
Note that the flow chart figure of exclusions was made in the Apple app Freeform; I can figure out how to share that file so it can be updated.
The follow-up survey hasn’t collected any new data in a few years so those numbers shouldn’t change from my thesis, but I pulled new demo data and those numbers do need to be updated.
## [1] 17825
## [1] 61.80645
## Number of SDAM participants (combined): 11319
## Number of non-SDAM participants (combined): 6506
The following numbers are pulled from the results of the
demo-cleaning script but I’m writing them down here too for
easy reference.
Total responses: 37543 Incomplete: 15528 Duplicates: 734 Suspicious response patterns (submitted at same time or blank country not in GTA): 64 Attention checks: 1572 Education outliers: 778 HSAM: 365
Exclusion numbers for individual neurological/health conditions can
be found in output of the demo-cleaning-extra script.
I didn’t look at PHQ in my thesis since I excluded people with high PHQ scores, but since I added those people back into the dataset, I’ll take a look at their PHQ scores.
## [1] 944
SAM Raw Scores PLS (No item weights or norming)
Set up data:
Run PLS:
Variance explained: 0.2437705
Plot contributions:
Set up data:
Run PLS:
Variance explained: 0.2237311
Plot contributions:
Set up data:
Run PLS:
Variance explained: 0.2253163
Plot contributions:
## [1] "Wilcox test"
## # A tibble: 1 × 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 field_obs_diff No Yes 4934 11016 36059096. 2.12e-245
## [1] "Wilcox effect size"
## # A tibble: 1 × 7
## .y. group1 group2 effsize n1 n2 magnitude
## * <chr> <chr> <chr> <dbl> <int> <int> <ord>
## 1 field_obs_diff No Yes 0.265 4934 11016 small
## $episodic
## Df Sum Sq Mean Sq F value Pr(>F)
## sdam_demo 1 22128 22128 1233 <2e-16 ***
## Residuals 15950 286259 18
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1873 observations deleted due to missingness
##
## $semantic
## Df Sum Sq Mean Sq F value Pr(>F)
## sdam_demo 1 422 421.9 37.78 8.1e-10 ***
## Residuals 15950 178100 11.2
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1873 observations deleted due to missingness
##
## $spatial
## Df Sum Sq Mean Sq F value Pr(>F)
## sdam_demo 1 438 438.0 43 5.65e-11 ***
## Residuals 15950 162470 10.2
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1873 observations deleted due to missingness
##
## $future
## Df Sum Sq Mean Sq F value Pr(>F)
## sdam_demo 1 32411 32411 1508 <2e-16 ***
## Residuals 15950 342807 21
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1873 observations deleted due to missingness
## $episodic
## Df Sum Sq Mean Sq F value Pr(>F)
## sdam_demo 1 292504 292504 2715 <2e-16 ***
## Residuals 15950 1718446 108
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1873 observations deleted due to missingness
##
## $semantic
## Df Sum Sq Mean Sq F value Pr(>F)
## sdam_demo 1 26454 26454 185.2 <2e-16 ***
## Residuals 15950 2278018 143
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1873 observations deleted due to missingness
##
## $spatial
## Df Sum Sq Mean Sq F value Pr(>F)
## sdam_demo 1 21592 21592 79.18 <2e-16 ***
## Residuals 15950 4349442 273
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1873 observations deleted due to missingness
##
## $future
## Df Sum Sq Mean Sq F value Pr(>F)
## sdam_demo 1 123946 123946 1020 <2e-16 ***
## Residuals 15950 1937409 121
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1873 observations deleted due to missingness
## $episodic
## Df Sum Sq Mean Sq F value Pr(>F)
## sdam_demo 1 1419 1418.7 2704 <2e-16 ***
## Residuals 15950 8368 0.5
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1873 observations deleted due to missingness
##
## $semantic
## Df Sum Sq Mean Sq F value Pr(>F)
## sdam_demo 1 137 136.82 187.8 <2e-16 ***
## Residuals 15950 11621 0.73
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1873 observations deleted due to missingness
##
## $spatial
## Df Sum Sq Mean Sq F value Pr(>F)
## sdam_demo 1 86 86.47 76.76 <2e-16 ***
## Residuals 15950 17968 1.13
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1873 observations deleted due to missingness
##
## $future
## Df Sum Sq Mean Sq F value Pr(>F)
## sdam_demo 1 634 634.4 1018 <2e-16 ***
## Residuals 15950 9936 0.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1873 observations deleted due to missingness
For the QMI plot I had to manually move the legend in a photo editing app because I couldn’t figure out how to get R to do it.
Variance explained: 0.0160726
Plot contributions:
Variance explained: 0.0103454
Plot contributions:
I also had to manually edit the legend position for the personality plot.
I’m just including 1 code chunk as an example of how to pull the percentages & chi-square statistics for the trauma categories. This would be repeated for each category.
## # A tibble: 1 × 6
## n statistic p df method p.signif
## * <int> <dbl> <dbl> <int> <chr> <chr>
## 1 17825 17864. 0 4 Chi-square test ****
## [1] "Cramer's V: 0.707887584733064"
## # A tibble: 1 × 6
## n statistic p df method p.signif
## * <int> <dbl> <dbl> <int> <chr> <chr>
## 1 17825 17945. 0 4 Chi-square test ****
## [1] "Cramer's V: 0.709491455909655"
## # A tibble: 1 × 6
## n statistic p df method p.signif
## * <int> <dbl> <dbl> <int> <chr> <chr>
## 1 17825 17920. 0 4 Chi-square test ****
## [1] "Cramer's V: 0.708990764168293"
## # A tibble: 1 × 6
## n statistic p df method p.signif
## * <int> <dbl> <dbl> <int> <chr> <chr>
## 1 17825 17878. 0 4 Chi-square test ****
## [1] "Cramer's V: 0.708166905487626"
## # A tibble: 1 × 6
## n statistic p df method p.signif
## * <int> <dbl> <dbl> <int> <chr> <chr>
## 1 17825 18201. 0 4 Chi-square test ****
## [1] "Cramer's V: 0.714531482680773"
## # A tibble: 1 × 6
## n statistic p df method p.signif
## * <int> <dbl> <dbl> <int> <chr> <chr>
## 1 17825 18229. 0 4 Chi-square test ****
## [1] "Cramer's V: 0.715084455883821"
## # A tibble: 1 × 6
## n statistic p df method p.signif
## * <int> <dbl> <dbl> <int> <chr> <chr>
## 1 17825 17865. 0 4 Chi-square test ****
## [1] "Cramer's V: 0.707899124236418"
## # A tibble: 1 × 6
## n statistic p df method p.signif
## * <int> <dbl> <dbl> <int> <chr> <chr>
## 1 17825 17954. 0 4 Chi-square test ****
## [1] "Cramer's V: 0.709655279212582"
## # A tibble: 1 × 6
## n statistic p df method p.signif
## * <int> <dbl> <dbl> <int> <chr> <chr>
## 1 17825 18078. 0 4 Chi-square test ****
## [1] "Cramer's V: 0.712110982645491"
I’ve also just included 1 example of how to get the Wilcox stats for each IES subscale comparison.
## [1] "Cohen's d for ies_recent_int: 0.302"
## [1] "Wilcox test"
## # A tibble: 1 × 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 ies_recent_int No Yes 265 697 108924. 0.0000146
## [1] "Wilcox effect size"
## # A tibble: 1 × 7
## .y. group1 group2 effsize n1 n2 magnitude
## * <chr> <chr> <chr> <dbl> <int> <int> <ord>
## 1 ies_recent_int No Yes 0.140 265 697 small
## [1] "Cohen's d for ies_recent_total: 0.144"
## [1] "Wilcox test"
## # A tibble: 1 × 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 ies_recent_total No Yes 265 697 100480 0.0346
## [1] "Wilcox effect size"
## # A tibble: 1 × 7
## .y. group1 group2 effsize n1 n2 magnitude
## * <chr> <chr> <chr> <dbl> <int> <int> <ord>
## 1 ies_recent_total No Yes 0.0681 265 697 small
## [1] "Cohen's d for ies_recent_avd: 0.051"
## [1] "Wilcox test"
## # A tibble: 1 × 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 ies_recent_avd No Yes 265 697 90364 0.605
## [1] "Wilcox effect size"
## # A tibble: 1 × 7
## .y. group1 group2 effsize n1 n2 magnitude
## * <chr> <chr> <chr> <dbl> <int> <int> <ord>
## 1 ies_recent_avd No Yes 0.0167 265 697 small
## [1] "Cohen's d for ies_recent_hyp: 0.173"
## [1] "Wilcox test"
## # A tibble: 1 × 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 ies_recent_hyp No Yes 265 697 103806. 0.00239
## [1] "Wilcox effect size"
## # A tibble: 1 × 7
## .y. group1 group2 effsize n1 n2 magnitude
## * <chr> <chr> <chr> <dbl> <int> <int> <ord>
## 1 ies_recent_hyp No Yes 0.0979 265 697 small
## [1] "Cohen's d for ies_remote_total: 0.235"
## [1] "Wilcox test"
## # A tibble: 1 × 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 ies_remote_total No Yes 265 696 105034. 0.000859
## [1] "Wilcox effect size"
## # A tibble: 1 × 7
## .y. group1 group2 effsize n1 n2 magnitude
## * <chr> <chr> <chr> <dbl> <int> <int> <ord>
## 1 ies_remote_total No Yes 0.108 265 696 small
## [1] "Cohen's d for ies_remote_int: 0.366"
## [1] "Wilcox test"
## # A tibble: 1 × 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 ies_remote_int No Yes 265 696 111938. 0.000000285
## [1] "Wilcox effect size"
## # A tibble: 1 × 7
## .y. group1 group2 effsize n1 n2 magnitude
## * <chr> <chr> <chr> <dbl> <int> <int> <ord>
## 1 ies_remote_int No Yes 0.166 265 696 small
## [1] "Cohen's d for ies_remote_avd: 0.04"
## [1] "Wilcox test"
## # A tibble: 1 × 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 ies_remote_avd No Yes 265 696 94500 0.553
## [1] "Wilcox effect size"
## # A tibble: 1 × 7
## .y. group1 group2 effsize n1 n2 magnitude
## * <chr> <chr> <chr> <dbl> <int> <int> <ord>
## 1 ies_remote_avd No Yes 0.0191 265 696 small
## [1] "Cohen's d for ies_remote_hyp: 0.226"
## [1] "Wilcox test"
## # A tibble: 1 × 7
## .y. group1 group2 n1 n2 statistic p
## * <chr> <chr> <chr> <int> <int> <dbl> <dbl>
## 1 ies_remote_hyp No Yes 265 696 105380. 0.000589
## [1] "Wilcox effect size"
## # A tibble: 1 × 7
## .y. group1 group2 effsize n1 n2 magnitude
## * <chr> <chr> <chr> <dbl> <int> <int> <ord>
## 1 ies_remote_hyp No Yes 0.111 265 696 small
Variance explained: 0.0120711
Plot contributions:
Variance explained: 0.0816188, 0.0016291
Plot contributions:
## R version 4.3.0 (2023-04-21 ucrt)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 11 x64 (build 22631)
##
## Matrix products: default
##
##
## locale:
## [1] LC_COLLATE=English_Canada.utf8 LC_CTYPE=English_Canada.utf8
## [3] LC_MONETARY=English_Canada.utf8 LC_NUMERIC=C
## [5] LC_TIME=English_Canada.utf8
##
## time zone: America/Toronto
## tzcode source: internal
##
## attached base packages:
## [1] grid stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] corrplot_0.92 reshape2_1.4.4 RColorBrewer_1.1-3
## [4] lubridate_1.9.2 forcats_1.0.0 stringr_1.5.0
## [7] purrr_1.0.1 readr_2.1.4 tibble_3.2.1
## [10] tidyverse_2.0.0 car_3.1-2 carData_3.0-5
## [13] tidyr_1.3.0 magrittr_2.0.3 TInPosition_0.13.6.1
## [16] InPosition_0.12.7.1 TExPosition_2.6.10.1 ExPosition_2.8.23
## [19] prettyGraphs_2.1.6 dplyr_1.1.2 rstatix_0.7.2
## [22] PTCA4CATA_0.1.0 psych_2.3.6 lsr_0.5.2
## [25] lemon_0.4.6 gridExtra_2.3 ggpubr_0.6.0
## [28] ggplot2_3.5.0
##
## loaded via a namespace (and not attached):
## [1] libcoin_1.0-9 rstudioapi_0.14 jsonlite_1.8.4
## [4] TH.data_1.1-2 modeltools_0.2-23 farver_2.1.1
## [7] rmarkdown_2.21 ragg_1.2.5 vctrs_0.6.2
## [10] base64enc_0.1-3 askpass_1.1 janitor_2.2.0
## [13] htmltools_0.5.5 curl_5.0.0 broom_1.0.5
## [16] cellranger_1.1.0 Formula_1.2-5 sass_0.4.6
## [19] KernSmooth_2.23-20 bslib_0.5.0 htmlwidgets_1.6.2
## [22] plyr_1.8.8 sandwich_3.0-2 zoo_1.8-12
## [25] cachem_1.0.8 uuid_1.1-0 mime_0.12
## [28] lifecycle_1.0.3 pkgconfig_2.0.3 Matrix_1.6-0
## [31] R6_2.5.1 fastmap_1.1.1 shiny_1.7.4.1
## [34] snakecase_0.11.1 digest_0.6.31 colorspace_2.1-0
## [37] reshape_0.8.9 Hmisc_5.1-0 textshaping_0.3.6
## [40] labeling_0.4.2 fansi_1.0.4 timechange_0.2.0
## [43] abind_1.4-5 compiler_4.3.0 fontquiver_0.2.1
## [46] withr_2.5.0 htmlTable_2.4.1 backports_1.4.1
## [49] highr_0.10 gplots_3.1.3 ggsignif_0.6.4
## [52] MASS_7.3-58.4 openssl_2.1.0 gfonts_0.2.0
## [55] gtools_3.9.4 caTools_1.18.2 tools_4.3.0
## [58] foreign_0.8-84 zip_2.3.0 httpuv_1.6.11
## [61] nnet_7.3-18 glue_1.6.2 nlme_3.1-162
## [64] promises_1.2.0.1 checkmate_2.2.0 cluster_2.1.4
## [67] generics_0.1.3 gtable_0.3.3 tzdb_0.4.0
## [70] data.table_1.14.8 hms_1.1.3 xml2_1.3.5
## [73] coin_1.4-2 utf8_1.2.3 ggrepel_0.9.3
## [76] pillar_1.9.0 later_1.3.1 splines_4.3.0
## [79] lattice_0.21-8 survival_3.5-5 tidyselect_1.2.0
## [82] rvg_0.3.3 fontLiberation_0.1.0 knitr_1.43
## [85] fontBitstreamVera_0.1.1 crul_1.4.0 stats4_4.3.0
## [88] xfun_0.39 matrixStats_1.0.0 stringi_1.8.3
## [91] yaml_2.3.7 evaluate_0.21 codetools_0.2-19
## [94] httpcode_0.3.0 officer_0.6.2 gdtools_0.3.3
## [97] cli_3.6.1 rpart_4.1.19 xtable_1.8-4
## [100] systemfonts_1.0.4 munsell_0.5.0 jquerylib_0.1.4
## [103] Rcpp_1.0.10 readxl_1.4.3 parallel_4.3.0
## [106] ellipsis_0.3.2 bitops_1.0-7 mvtnorm_1.2-2
## [109] scales_1.3.0 crayon_1.5.2 rlang_1.1.1
## [112] cowplot_1.1.1 multcomp_1.4-25 mnormt_2.1.1