| ********************************************************************************************************** | |
| * This dofile calls on all others to replicate the results. | |
| * | |
| * IMPORTANT: Relaunch Stata before replication. | |
| * | |
| * IMPORTANT: To run this do file, indicate your working directory in line 13 (everything below is relative to it): | |
| ********************************************************************************************************** | |
| clear all | |
| cap clear matrix | |
| global dir "~/Dropbox/Sharing Fake News/REPLICATION_FINAL" | |
| * This master dofile: | |
| * 1) sets the path to working sub-directories relative to the working directory "$dir"; | |
| * 2) installes additional packages and ados; | |
| * 3) calls a dofile that infiles the original data and generates the dataset for analysis; | |
| * 4) calls a dofile that performs the analsys and generates all the results in the article; | |
| * 5) calls a dofile that generates additional numbers used in the text of the article. | |
| ********************************************************************************************************** | |
| * Generate working directories: | |
| ********************************************************************************************************** | |
| cap mkdir "$dir/generated_data" | |
| cap mkdir "$dir/results" | |
| cap mkdir "$dir/results/figures" | |
| cap mkdir "$dir/results/tables" | |
| ********************************************************************************************************** | |
| * Set path to working directories: | |
| ********************************************************************************************************** | |
| global original_data "$dir/original_data" | |
| global generated_data "$dir/generated_data" | |
| ********************************************************************************************************** | |
| * Set font for the figures: | |
| ********************************************************************************************************** | |
| graph set window fontface "Times New Roman" | |
| ********************************************************************************************************** | |
| * Install ados / packages: | |
| ********************************************************************************************************** | |
| cap ssc install estout.ado | |
| cap ssc install esttab.ado | |
| cap ssc install eststo.ado | |
| cap ssc install estadd.ado | |
| cap ssc install estpost.ado | |
| cap ssc install cibar.ado | |
| cap net install grc1leg.pkg | |
| cap ssc install outreg2.ado | |
| * NB! If some of these ados and packages do not install automatically and are not on your computer already, | |
| * type in the command line "findit ADO_NAME,ado" and follow the instructions for installation | |
| ********************************************************************************************************** | |
| * Generate dataset: | |
| ********************************************************************************************************** | |
| do "$dir/dofiles/1.infile_data.do" | |
| ********************************************************************************************************** | |
| * Use dataset to generate results: | |
| ********************************************************************************************************** | |
| do "$dir/dofiles/2.analysis_final_paper.do" | |
| ********************************************************************************************************** | |
| * Replicate additional numbers in the text, see README Table B | |
| ********************************************************************************************************** | |
| do "$dir/dofiles/3.numbers_in_text.do" | |