five

Replication Data for: The Future is History: Restorative Nationalism and Conflict in Post-Napoleonic Europe

收藏
DataONE2024-04-15 更新2024-10-19 收录
下载链接:
https://search.dataone.org/view/sha256:8b58949ed1ce599c80b68d8c80f7b12274314ec5d9f2eb36fdcb970f76798e86
下载链接
链接失效反馈
官方服务:
资源简介:
This replication folder contains all data (in the \"data\" subfolder) and R code (in the \"scripts\" subfolder) to replicate the findings reported in the main text and online appendix of our article. Before starting, please make sure that the following R libraries are installed: fixest #v0.11.1 car #v3.1-2 here #v1.0.1 dplyr #v1.1.3 ggplot2 #v3.4.3 The results should, in principle, not depend on a specific version of these packages but we still state them to ensure long-term reproducibility. The replication package was built and tested in R version 4.3.1 running under macOS Ventura 13.4. To replicate all results in one go, please use the file \"00_replicate_everything.R\" from the \"scripts\" subfolder. Before you run this script, make sure to edit line 4 and enter the path to the location where you have stored our replication folder. Once this is done, run the whole script. It will source individual scripts for each table/figure in the article and appendix and store all tables as .tex files (figures as .pdf) in the \"output\" subfolder. For a closer look at individual tables or analyses within them, only run lines 1-61 of \"00_replicate_everything.R\" and then open/run the relevant script for the respective table from the \"scripts\" subfolder (e.g. \"table_A16.R\"). Note that the marginal effects and their standard errors and significance levels at the bottom of Table 4 (interaction models) are not automatically printed in \"output/table_4.tex\". To verify these results, please run the script \"scripts/table_4.R\" line by line and inspect the relevant marginal effects (e.g., \"m1.mfx.1\") and p values (e.g. \"m1.mfx.1.p\"). In case you have any questions on this replication package or spot any errors, please contact Yannick Pengl via e-mail (yannick.pengl@gmail.com).

本复现文件夹包含用于复现本文正文与在线附录中所报告研究结果的全部数据(存放于“data”子文件夹)与R代码(存放于“scripts”子文件夹)。开始复现前,请确保已安装以下R包:fixest(版本0.11.1)、car(版本3.1-2)、here(版本1.0.1)、dplyr(版本1.1.3)与ggplot2(版本3.4.3)。原则上,本研究结果的复现不依赖这些包的特定版本,但我们仍标注其版本号以保障长期可复现性。本复现包基于R 4.3.1版本与macOS Ventura 13.4系统构建并完成测试。若需一次性复现全部结果,请使用“scripts”子文件夹中的“00_replicate_everything.R”脚本文件。运行该脚本前,请编辑第4行代码,输入本复现文件夹的本地存储路径。完成设置后,运行完整脚本,其将依次调用本文与附录中各表格/图形对应的独立脚本,并将所有表格以.tex格式、图形以.pdf格式存储至“output”子文件夹中。若需单独查看某一表格或其中的分析过程,仅需运行“00_replicate_everything.R”的第1至61行代码,随后打开并运行“scripts”子文件夹中对应表格的专属脚本(例如“table_A16.R”)。请注意,表4(交互模型)底部的边际效应、标准误与显著性水平不会自动输出至“output/table_4.tex”文件中。若需验证该部分结果,请逐行运行“scripts/table_4.R”脚本,并查看对应的边际效应(例如“m1.mfx.1”)与p值(例如“m1.mfx.1.p”)。若您对本复现包有任何疑问或发现代码错误,请通过电子邮件联系Yannick Pengl(邮箱:yannick.pengl@gmail.com)。
创建时间:
2024-09-25
二维码
社区交流群
二维码
科研交流群
商业服务