DOI: 10.7910/dvn/pwhptg
title: Replication Data for: Introducing ReChat: A Lab-in-the-Cloud for Text Discussions

description: &lt;p&gt;This repository contains all materials needed to replicate results presented in the paper &lt;em&gt;"Introducing ReChat: A Lab-in-the-Cloud for Text Discussions"&lt;/em&gt; by Xiaoxiao Shen and William Small Schulz.&lt;/p&gt;

&lt;p&gt;The results can be reproduced by running the &lt;code&gt;code/analyses.R&lt;/code&gt; 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.&lt;/p&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;ul&gt;
 &lt;li&gt;&lt;code&gt;dplyr&lt;/code&gt; (version 1.1.4) for data manipulation,&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;haven&lt;/code&gt; (version 2.5.4) for reading and writing data formats like SPSS, SAS, and Stata,&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;lmtest&lt;/code&gt; (version 0.9-40) for diagnostic tests for linear models,&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;lubridate&lt;/code&gt; (version 1.9.3) for working with dates and times,&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;moments&lt;/code&gt; (version 0.14.1) for calculating moments of a dataset (e.g., skewness and kurtosis),&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;pdftools&lt;/code&gt; (version 3.4.0) for extracting text, metadata, and other content from PDF files,&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;psych&lt;/code&gt; (version 2.3.6) for psychological and statistical analysis,&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;purrr&lt;/code&gt; (version 1.0.2) for functional programming tools,&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;readr&lt;/code&gt; (version 2.1.5) for reading rectangular data quickly and efficiently,&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;sandwich&lt;/code&gt; (version 3.0-2) for robust covariance matrix estimators,&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;sentimentr&lt;/code&gt; (version 2.9.0) for text sentiment analysis,&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;stargazer&lt;/code&gt; (version 5.2.3) for creating LaTeX, HTML, and ASCII tables from regression models,&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;stringr&lt;/code&gt; (version 1.5.1) for string manipulation,&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;tidyr&lt;/code&gt; (version 1.3.1) for tidying data,&lt;/li&gt;
 &lt;li&gt;&lt;code&gt;webshot&lt;/code&gt; (version 0.5.5) for taking screenshots of web pages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The R package &lt;code&gt;webshot&lt;/code&gt; depends on &lt;code&gt;libpoppler-cpp-dev&lt;/code&gt; (version 0.62.0-2ubuntu2.14), which was installed with &lt;code&gt;apt-get&lt;/code&gt;, and on running the following line of code after installing the above packages:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Rscript -e "webshot::install_phantomjs()"&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Finally, our custom R package &lt;code&gt;rechat&lt;/code&gt; (sourced from GitHub under the repository &lt;code&gt;willschulz/rechat&lt;/code&gt; with commit hash &lt;code&gt;b68ee000e295cee1442c8a0d1fe3e73a92cae728&lt;/code&gt;) is also installed.&lt;/p&gt;