Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Analysis code

This repository contains the analysis code for a study examining whether affirmative communication reduces absolute ideological bias expression compared with debate and no-treatment conditions.

Study

Participants evaluated evidence related to migration and climate change. Absolute ideological bias expression was measured using the absolute signal detection theory bias parameter |b′|.

The study was preregistered on AsPredicted:

AsPredicted preregistration by4zm8

The present analysis focuses on the affirmative, debate, and no-treatment conditions. The counterfactual condition belongs to a separate research project and is not included.

Files

  • scripts/analyse_p1.R imports and prepares the data, applies the exclusion criteria, calculates the outcome variables, and conducts the statistical analyses.
  • scripts/outputs_p1.R generates the tables, figures, and analysis log.
  • scripts/php/routing.php contains the survey-routing logic used to assign the experimental conditions.

Requirements

The analysis was conducted in R 4.5.0.

Required R packages:

  • jsonlite
  • readr
  • dplyr
  • emmeans
  • sandwich
  • lme4
  • ggplot2
  • flextable
  • officer
  • writexl

Running the analysis

Run the scripts from the repository root in the following order:

Rscript scripts/analyse_p1.R
Rscript scripts/outputs_p1.R

The output script creates a timestamped directory under outputs/ containing the analysis log, CSV tables, figures, an Excel workbook with one worksheet per table, and a Word document with the generated tables.

Data availability

Individual-level survey data are not included in this repository. Access to the data is subject to the data-protection and data-sharing procedures of the research project.

The analysis additionally requires the verified IBE item key and the final exclusion list. These project-specific files are not publicly distributed.

License

The code in this repository is available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages