Code Monkey home page Code Monkey logo

elections's People

Contributors

kinto-b avatar

Watchers

 avatar

elections's Issues

Diagnostics

In c618bbe I increased the variance on the priors for what is effectively the division level swing and on the coefficients of the demographic covariates. This is good insofar as it lets the record-level data have more influence on the estimates. Prior to the change the estimates were anchored really strongly to the previous election result, which wasn't ideal.

However, this introduced pretty serious computational issues. The (cleaned up) stan output reads:

1: Divergent Transitions Warning:
There were 1788 divergent transitions after warmup. To understand why this is an issue and how to address it, visit:
https://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
(Package 'StanHeaders' was built under R version 4.2.3)

2: Sampling Problem Diagnosis:
Examine the pairs() plot to identify potential sampling issues.
(Package 'StanHeaders' was built under R version 4.2.3)

3: Low Bulk Effective Samples Size (ESS) Warning:
Bulk Effective Samples Size (ESS) is too low, indicating potential unreliability of posterior means and medians.
Running the chains for more iterations might help.
(Package 'StanHeaders' was built under R version 4.2.3)

4: Low Tail Effective Samples Size (ESS) Warning:
Tail Effective Samples Size (ESS) is too low, suggesting potential unreliability of posterior variances and tail quantiles.
Running the chains for more iterations might help.
(Package 'StanHeaders' was built under R version 4.2.3)

Divergences:
1788 out of 10000 iterations encountered divergences (17.88%).
Consider increasing the 'adapt_delta' parameter to address the divergences.

Tree Depth:
None of the 10000 iterations reached the maximum tree depth of 10.

Energy:
E-BFMI indicates no pathological behavior.

The large number of divergent transitions is particularly concerning.

2022 Prediction

Generalise the code to accept data from different years, then run the pipeline using data for the 2022 election. This will also set us up to run a 2025 prediction.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.