Skip to content

Code and materials for Mathur et al. (2018) "Registered multisite replication of Risen & Gilovich (2008)"

Notifications You must be signed in to change notification settings

mayamathur/ML5_risen_gilovich

Repository files navigation

Overview

This repository contains all data and code to reproduce analyses in the paper:

Mathur MB, et al. Multi-site replication of tempting-fate effects in Risen & Gilovich (2008). In preparation.

How to reproduce analyses

The simplest way to reproduce analyses reported in the paper (main_text.pdf) is simply to run the Markdown file main_text.Rmd, which embeds all analyses in the manuscript.

Data files

All data are in the "data" folder:

  • "raw" contains raw, unmodified site-level datasets exactly as provided by site investigators to MBM.
  • "prepped" contains site-level datasets that have undergone cleaning and variable name standardization. These were used
  • "other_replications" contains data from other replications (RPP and ML2) to which we compared our results in the manuscript for site-level audits but are not directly used in analysis.
  • full_prepped_dataset.csv, created by data_prep.Rmd, contains all subject-level data from all sites and is the only ML5 data file used directly for analyses. Also see its data dictionary, analysis_data_dictionary.csv.
  • data_prepped_rpp.csv and data_prepped_rpp.txt are from Mathur & Frank (2012)'s previous replication and are used for reporting their effect sizes in the manuscript.
  • analysis_data_dictionary.csv is a data dictionary for full_prepped_dataset.csv (along with additional variables, like site-level stats, added by analysis.R)

Data preparation code files

  • main_code/data_prep.Rmd: Takes the site-level raw datasets (see above) and uses them to produce the site-level prepped datasets as well as full_prepped_dataset.csv.
  • main_code/data_prep.pdf: A report produced by data_prep.Rmd that was used for site-level audits.

Analysis code files

The key files are:

  • manuscript/main_text.Rmd: The manuscript written in Markdown, which integrates statistics into the manuscript by loading saved R objects from analysis_objects.rds.

  • main_code/analysis.R: The workhorse analysis script that conducts all analyses and produces analysis_objects.rds as well as figures (forest_main.pdf and forest_int.pdf) for use in the manuscript.

  • analysis_objects.rds: Saved R objects (e.g., effect sizes) produced by analysis.R.

  • helper.R: Helper functions and is called by analysis.R.

  • "supplement" contains a Markdown file containing code and prose for the online supplement

Other files

  • refs_ml5.bib: BibTeX references cited in manuscript.
  • summary_table: Table 1 in various formats. Originally created in Excel.
  • "protocols": Contains power simulation used to determine sample sizes and protocols before and after editorial review. The file Risen & Gilovich Across-Site Analyses is the final, preregistered protocol.
  • "materials": Contains questionnaire and MTurk information and materials. The file 2016-11-7 Qualtrics questionnaire.qsf can be directly loaded into Qualtrics to rerun the experiment.
  • "to_submit": Various versions of the manuscript submitted to AMPPS

About

Code and materials for Mathur et al. (2018) "Registered multisite replication of Risen & Gilovich (2008)"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published