Upskill_Public

Reproducibility Guide (Nature Human Behaviour)

This README maps the paper’s tables and figures to the scripts, data inputs, and output files that reproduce them.

Working directory

Run the analysis scripts from analysis/, not from the repository root. The scripts use relative paths such as ../data/... and ../computed_objects/....

Recommended invocation pattern:

cd analysis
Rscript co_experiment_data.R

Canonical data sources

The analysis uses two canonical raw datasets:

Derived datasets used across analyses

The repository builds two core derived datasets:

Dependencies

Required R packages

The analysis scripts import the following R packages:

For CRAN packages, you can install them with:

install.packages(c(
  "dplyr",
  "tidyr",
  "ggplot2",
  "stargazer",
  "haven",
  "lfe",
  "lmtest",
  "sandwich",
  "forcats",
  "magrittr",
  "msm",
  "car",
  "broom",
  "readr",
  "latex2exp",
  "quantreg",
  "devtools"
))

Install JJHmisc from GitHub:

# Install devtools if you haven't already
install.packages("devtools")

# Install JJHmisc from GitHub
devtools::install_github("johnjosephhorton/JJHmisc")

Output directories

Generated outputs are written to multiple locations in writeup/, primarily:

Main text tables and figures

Table 1. Building the experimental sample

Figure 1. Effect of AI treatment on workers’ ability to solve data science problems

Figure 2. Effect of AI treatment by prior coding experience

Figure 3. Post-experiment data science knowledge without GenAI

Figure 4. Predictions about ChatGPT capabilities / calibration treatment effects

Appendix tables and figures

Table B9

Tables B10-B13

Table B14

Learning robustness table

Table B15 (Lee bounds)

Tables B16-B18

Tables B19-B21

Professional identity / belief appendix tables

Completion and timing appendix tables

Calibration regression table

Figure B3

Figure B4

Figure B5

Recommended execution order

The sequence below is the recommended order for reproducing the paper-facing outputs.

Step 1: build the main analysis dataset

cd analysis
Rscript co_experiment_data.R

Produces computed_objects/experimental_data.csv.

Step 2: build the full-sample derived dataset

Rscript co_experiment_data_all.R

Produces computed_objects/experimental_data_all.csv.

Step 3: run the paper-facing table and figure scripts

Rscript table_sample.R
Rscript plot_task_grades.R
Rscript plot_task_grades_het.R
Rscript table_learning.R
Rscript table_callibration.R
Rscript table_benchmark.R
Rscript table_task_grades.R
Rscript table_robust.R
Rscript tab_task_detailed.R
Rscript table_finish.R
Rscript table_time.R
Rscript table_confidencechange.R
Rscript table_careerbeliefs.R

Step 4: run the Stata robustness / attrition files if needed

stata -b do leebounds.do
stata -b do attrition.do

These scripts require Stata and are needed for the Lee-bounds / attrition appendix outputs.

Upskill_Public