-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run this? #28
Comments
If called from the R file, the 2016 version of the model will work for any day in the election. However the 2020 model was set up to show the code behind our approach, not to produce live predictions for the election (that would have created a slight conflict of interest for us).
…On Jun 24, 2023 at 7:53 PM +0100, Nuño Sempere ***@***.***>, wrote:
I'm trying to run the scripts/model/poll_model_2020.stan. After compiling it with cmdstan, I keep getting the error:
$ ./poll_model_2020 method=sample num_samples=1000 num_warmup=1000
method = sample (Default)
sample
num_samples = 1000 (Default)
num_warmup = 1000 (Default)
save_warmup = 0 (Default)
thin = 1 (Default)
adapt
engaged = 1 (Default)
gamma = 0.050000000000000003 (Default)
delta = 0.80000000000000004 (Default)
kappa = 0.75 (Default)
t0 = 10 (Default)
init_buffer = 75 (Default)
term_buffer = 50 (Default)
window = 25 (Default)
algorithm = hmc (Default)
hmc
engine = nuts (Default)
nuts
max_depth = 10 (Default)
metric = diag_e (Default)
metric_file = (Default)
stepsize = 1 (Default)
stepsize_jitter = 0 (Default)
num_chains = 1 (Default)
id = 1 (Default)
data
file = (Default)
init = 2 (Default)
random
seed = 4125478090 (Default)
output
file = output.csv (Default)
diagnostic_file = (Default)
refresh = 100 (Default)
sig_figs = -1 (Default)
profile_file = profile.csv (Default)
num_threads = 1 (Default)
Exception: variable does not exist; processing stage=data initialization; variable name=N_national_polls; base type=int (in '../us-potus-model/scripts/model/poll_model_2020.stan', line 2, column 2 to column 23)
My sense is that there is probably some data file that I'd have to feed into this, but, being a complete novice with stan, I'm not sure where to find it. If I use
$ ./poll_model_2020 method=sample num_samples=1000 num_warmup=1000 data file=../../data/all_polls.csv
I still get the same error.
Any thoughts? Coming from https://statmodeling.stat.columbia.edu/2023/06/14/the-economist-is-hiring-a-political-data-scientist-to-do-election-modeling/, where Andrew mentioned that getting this model to run would be "trivial".
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Oh, sad to see. Is there any chance that now, a few years after the election, you could make that part of the code publicly reproducible? I understand if this is too much trouble, though, or if you want to hide some stuff to keep some "modelling lead" in advance of the 2024 election. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to run the
scripts/model/poll_model_2020.stan
. After compiling it with cmdstan, I keep getting the error:My sense is that there is probably some data file that I'd have to feed into this, but, being a complete novice with stan, I'm not sure where to find it. If I use
I still get the same error.
Any thoughts? Coming from https://statmodeling.stat.columbia.edu/2023/06/14/the-economist-is-hiring-a-political-data-scientist-to-do-election-modeling/, where Andrew mentioned that getting this model to run would be "trivial".
The text was updated successfully, but these errors were encountered: