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_data
folder. - Run
ces_data/data_clean.R
script which will extract all the requisite survey questions about ideology and place them into thecleaned
folder. - You can then run
data/providing_ids.R
which will create a single giant csv with all the data. - Run
data/dynamic_prep.R
which will generate two files into themodel
folder. Themodel_data.json
file will be used by stan, and thecandidate_data.csv
is 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.sh
is 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.R
which 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.R
which will connect everything together. You will have to make sure that thesummary.csv
file is in the right spot, and that you’ve downloaded all the supplementary files todata/supplementary_data
.