
										Readme for: 
				"Triggering without Deceiving -- An Attempt at Designing a Non-Deceptive Male Identity Threat Treatment"
								Selina Hofstetter, Anna M. Wilke, Tinghua Yu


                                        Contents

- _codebook/                                   	=    Codebook                       
    - codebook.xlsx                             =    Contains codebook for the variable subset from the 11th wave of The American Social Survey (TASS) (2023) used in our study
- 00_rawdata/                                   =    Contains the raw data for our study
    - tass_variable_subset.csv                  =    Contains a variable subset from the 11th wave of The American Social Survey (TASS) (2023) used in our study
- 01_use_data/					=    Contains the cleaned data we use for our analyses
    - 00_null_distribution/                     =    Contains the null distribution assignment matrix used to conduct all randomization inference (RI) analyses in our study
      - null_distribution.RData			=    Null distribution assignment matrix 
    - TASS_data.RData                           =    Cleaned data with all coded variables used in our study
- 02_code/                                      =    Contains all code to build the data used in our study and generate all tables and figures
    - _format_tables_functions.R                =    Script loading all table formatting functions
    - _generate_balance_table.R                 =    Script loading function to generate balance table
    - _generate_sample_desc_table.R             =    Script loading function to generate table of sample descriptives
    - _load_packages.R.                         =    Script loading all required R packages
    - _main_script.R                            =    Main script that sources in all the other scripts to first construct the analysis data and then run the analyses. Set build_data to TRUE if you would like to re-build the analysis data from the raw data. Otherwise, set build_data to FALSE.  
    - _RI_functions.R.                          =    Script loading randomization inference (RI) functions
    - 00_build_data/                            =    Contains code to build the data used in our study
      - 00_subset_tass_data.R			=    Generates the variable subset from the 11th wave of The American Social Survey (TASS) (2023) used in our study. This script is included for transparency purposes only and cannot be run because the full TASS data file is not included in the replication package.
      - 01_code_variables.R			=    Script reading the raw data, cleaning it, and generating all variables used in the analyses
      - 02_generate_null_distribution.R		=    Script generating the null distribution assignment matrix for RI
    - 01_analysis/                              =    Contains code to generate all figures and tables
      - 00_main_text/			        =    Contains scripts to generate all figures in the main text
        - 00_figure1.R	                        =    Script generating Figure 1 in main text
        - 00_figure2.R	                        =    Script generating Figure 2 in main text
    - 01_appendix/			        =    Contains scripts to generate all figures and tables in the appendix
        - 00_tableA1.R	                        =    Script generating Table A1 in appendix
        - 01_figureA2.R	                        =    Script generating Figure A2 in appendix
        - 02_tableA2.R	                        =    Script generating Table A2 in appendix
        - 03_tableA3.R	                        =    Script generating Table A3 in appendix
        - 04_tableA4.R	                        =    Script generating Table A4 in appendix
        - 05_tableA5.R	                        =    Script generating Table A5 in appendix
        - 06_tableA6.R	                        =    Script generating Table A6 in appendix
        - 07_tableA7.R	                        =    Script generating Table A7 in appendix
- 03_output/                                    =    Figure (in .pdf format) and table outputs (in .tex format). File name in accordance with numbering in main manuscript and appendix
- srm.Rproj                                     =    Start by opening the R project and run everything from here such that file paths work
- renv/                                         =    Local library of packages created using the R package renv (1.2.3), call renv::restore() to reset packages to the versions used to create these results



                            How to run the code 

1. Open srm.Rproj to ensure that all file paths are set relative to the replication archive
2. The R package renv (1.2.3) has been used  to handle dependency on packages. The relevant files are contained in the folder called "renv." Call renv::restore() to install the relevant versions of all packages that are used throughout the code scripts.  
3. Open _main_script.R and run all scripts from here
4. Set build_data to TRUE if you would like to re-create the analysis data from the raw data. Otherwise, the script loads the analysis data. 

 
                            Information about R session 

R version 4.2.2 (2022-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS 15.7.3
Computer Processor: Apple M1 Pro
Computer Memory (RAM): 16 GB

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] parallel  stats     graphics  grDevices datasets  utils     methods   base     

other attached packages:
 [1] xtable_1.8-8    mice_3.19.0     texreg_1.39.5   Hmisc_5.2-5     estimatr_1.0.6  lubridate_1.9.5
 [7] forcats_1.0.1   stringr_1.6.0   dplyr_1.2.1     purrr_1.2.2     readr_2.2.0     tidyr_1.3.2    
[13] tibble_3.3.1    ggplot2_4.0.3   tidyverse_2.0.0

loaded via a namespace (and not attached):
 [1] httr_1.4.8         splines_4.2.2      foreach_1.5.2      Formula_1.2-5      S7_0.2.2          
 [6] Rdpack_2.6.6       renv_1.2.3         pillar_1.11.1      backports_1.5.1    lattice_0.20-45   
[11] glue_1.8.1         reformulas_0.4.4   digest_0.6.39      RColorBrewer_1.1-3 rbibutils_2.4.1   
[16] checkmate_2.3.4    minqa_1.2.8        colorspace_2.1-2   htmltools_0.5.9    Matrix_1.6-5      
[21] pkgconfig_2.0.3    broom_1.0.13       scales_1.4.0       tzdb_0.5.0         lme4_2.0-1        
[26] timechange_0.4.0   htmlTable_2.5.0    generics_0.1.4     farver_2.1.2       withr_3.0.2       
[31] pan_1.9            nnet_7.3-18        cli_3.6.6          survival_3.4-0     magrittr_2.0.5    
[36] mitml_0.4-5        evaluate_1.0.5     nlme_3.1-160       MASS_7.3-58.1      foreign_0.8-83    
[41] textshaping_1.0.5  tools_4.2.2        data.table_1.18.4  hms_1.1.4          lifecycle_1.0.5   
[46] glmnet_5.0         cluster_2.1.4      compiler_4.2.2     systemfonts_1.3.2  rlang_1.2.0       
[51] grid_4.2.2         nloptr_2.2.1       iterators_1.0.14   rstudioapi_0.18.0  htmlwidgets_1.6.4 
[56] base64enc_0.1-6    rmarkdown_2.31     boot_1.3-28        gtable_0.3.6       codetools_0.2-18  
[61] R6_2.6.1           gridExtra_2.3      knitr_1.51         fastmap_1.2.0      jomo_2.7-6        
[66] ragg_1.5.2         shape_1.4.6.1      stringi_1.8.7      Rcpp_1.1.1-1.1     vctrs_0.7.3       
[71] rpart_4.1.19       tidyselect_1.2.1   xfun_0.57


                            Overview of Included Data Sources 

Hofstetter, Selina, Anna M. Wilke, and Tinghua Yu. 2026. “Triggering without Deceiving -- An Attempt at Designing a Non-Deceptive Male Identity Threat Treatment.” Harvard Dataverse. https://doi.org/10.7910/DVN/BVEAIR



														   