This repository contains all materials needed to replicate results presented in the paper "Introducing ReChat: A Lab-in-the-Cloud for Text Discussions" by Xiaoxiao Shen and William Small Schulz.
The results can be reproduced by running the code/analyses.R
script, which will rerun all data cleaning, model estimation, analyses, and visualizations from the paper, and which will output all the results presented in the paper.
The results shown in the paper were generated by running this script on an AWS r5d.4xlarge machine (with 16-core CPU and 120 GB memory, though this is significantly greater compute and memory than is necessary), running Ubuntu (18.04) and R (4.2.1), with the following R packages installed:
dplyr
(version 1.1.4) for data manipulation,
haven
(version 2.5.4) for reading and writing data formats like SPSS, SAS, and Stata,
lmtest
(version 0.9-40) for diagnostic tests for linear models,
lubridate
(version 1.9.3) for working with dates and times,
moments
(version 0.14.1) for calculating moments of a dataset (e.g., skewness and kurtosis),
pdftools
(version 3.4.0) for extracting text, metadata, and other content from PDF files,
psych
(version 2.3.6) for psychological and statistical analysis,
purrr
(version 1.0.2) for functional programming tools,
readr
(version 2.1.5) for reading rectangular data quickly and efficiently,
sandwich
(version 3.0-2) for robust covariance matrix estimators,
sentimentr
(version 2.9.0) for text sentiment analysis,
stargazer
(version 5.2.3) for creating LaTeX, HTML, and ASCII tables from regression models,
stringr
(version 1.5.1) for string manipulation,
tidyr
(version 1.3.1) for tidying data,
webshot
(version 0.5.5) for taking screenshots of web pages.
The R package webshot
depends on libpoppler-cpp-dev
(version 0.62.0-2ubuntu2.14), which was installed with apt-get
, and on running the following line of code after installing the above packages:
Rscript -e "webshot::install_phantomjs()"
Finally, our custom R package rechat
(sourced from GitHub under the repository willschulz/rechat
with commit hash b68ee000e295cee1442c8a0d1fe3e73a92cae728
) is also installed.
(2024-09-12)