The process to recreate the measure entirely:
- Download all the C/CES data and place the data files into the folders in the
data/ces_datafolder. - Run
ces_data/data_clean.Rscript which will extract all the requisite survey questions about ideology and place them into thecleanedfolder. - You can then run
data/providing_ids.Rwhich will create a single giant csv with all the data. - Run
data/dynamic_prep.Rwhich will generate two files into themodelfolder. Themodel_data.jsonfile will be used by stan, and thecandidate_data.csvis used to connect data at the end. - The actual estimation can be accomplished with
model/estimation.R. I run this on the Ohio Super Computer and so themodel/run.shis used to do that. This will produce several very large files that contain the entire posterior. - To summarize the posterior you can use
model/outputs.Rwhich is a very simple script (this takes a lot of RAM). This saves summary stats of the posterior assummary.csv. - Finally to produce useful outputs run
posterior/post_prep.Rwhich will connect everything together. You will have to make sure that thesummary.csvfile is in the right spot, and that you’ve downloaded all the supplementary files todata/supplementary_data.