These are the files used in the paper "Parents, Peers, and Politics: The Long-term Effects Of Vertical Social Ties" by Linuz Aggeborn, Nazita Lajevardi, Karl-Oskar Lindgren, Pr Nyman and Sven Oskarsson. 

We are not permitted to transfer the individual level data that we use in the paper. We therefore requested an exception from the journal's data availability and replication policy at the time of first submission. Please see the online appendix in the paper for more description on this matter and how to access the data that we have used in the empirical analyses in the paper. This replication package therefore only includes the dofiles and logs, but not the actual data.   



TABLE OF CONTENT:  

1. "masterdo": This dofile explain in which order all the Stata dofiles needs to be run. (Stata)
2. "initialize": A dofile that load and clean the raw data. (Stata)
3. "file preparation": A dofile that prepares the cleaned data files and merge them into panels. (Stata)
4. "datamanagement": Here we put together the final data set for the analysis. We also generate the neccesary variables. (Stata)
5. "descriptive": Here we generate the descriptive results. (Stata)  
6. "dataanalysis": This dofile contain the code for all the data analysis in the main paper and in the online appendix (except logit estimation in the online appendix, see below) (Stata)
7. "programs": A dofiles containing self-written programs that are used in the other dofiles. (Stata) 

8. "bifeAnalysis.R": A file that estimates the conditional logit results presented in the online appendix. This analysis is run in R using the bife package. 
 
We also include the Stata log files and a R log file. 


NOTES FOR TABLES AND FIGURES: 

The descriptive figures and tables may be replicated by using the dofile "descriptive". The table in the online appendix displaying the logit results may be replicated by "bifeAnalysis.R". All other tables and figures may be replicated by using "dataanalysis". 

Numbers and statistics presented in the body of the written text are printed when running the "datamanagement" and "descriptive" dofile. Please see the logs. 

BASE SOFTWARE DEPENDENCIES: 

Windows 10
Stata 15
R Studio 

ADDITIONAL DEPENDENCIES:

Stata:
ssc install postrcspline, (installed on Mars 6, 2018)
ssc install gtools, (installed on April 25, 2019)
ssc install estout, (installed on August 15, 2017)
ssc install reghdfe, (installed on April, 10, 2019)

R:
install.packages("bife", version = "0.6")
install.packages("data.table", version = "1.12.2")
install.packages("haven", version = "2.1.1")
install.packages("lfe", version = "2.8-3")

  
SEED LOCATIONS:

No seeds have been specified.  






