Skip to content

Commit

Permalink
recovery point
Browse files Browse the repository at this point in the history
  • Loading branch information
technocrat committed May 27, 2024
1 parent 0e2c0f2 commit f3f813c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
15 changes: 12 additions & 3 deletions _assets/scripts/polls_foot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,21 @@ prior_alpha = posterior_mean * (posterior_mean * (1 - posterior_mean) / poste
prior_beta = (1 - posterior_mean) * (posterior_mean * (1 - posterior_mean) / posterior_var - 1)
prior_dist = Beta(prior_alpha, prior_beta)

# @model function poll_model(num_votes::Int64, num_wins::Int64)
# # Define the prior using the Beta distribution
# p ~ prior_dist
#
# # Define the likelihood
# num_wins ~ Binomial(num_votes, p)
# end

@model function poll_model(num_votes::Int64, num_wins::Int64)
# Define the prior using the Beta distribution
p ~ prior_dist
p ~ Beta(2, 2)

# Define the likelihood
num_wins ~ Binomial(num_votes, p)
# Define the likelihood with additional uncertainty
p_survey ~ Beta(2, 2)
num_wins ~ Binomial(num_votes, p * p_survey)
end

# Set up the sampler
Expand Down
10 changes: 9 additions & 1 deletion sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,24 @@ df = CSV.read(IOBuffer(csv_data), DataFrame)
*Multistate*

- [Bloomberg/Morning Consult: conducted April](https://pro-assets.morningconsult.com/wp-uploads/2024/04/Bloomberg_2024-Election-Tracking-Wave-7.pdf)
- [Bloomberg/Morning Consult: conducted May](https://pro-assets.morningconsult.com/wp-uploads/2024/05/Bloomberg-Election-Tracking-Wave-8-Toplines-Crosstabs.pdf)
- [Bloomberg/Morning Consult: conducted March](https://pro-assets.morningconsult.com/wp-uploads/2024/03/Bloomberg_2024-Election-Tracking-Wave-6.pdf)
- [Emerson College: conducted April](https://emersoncollegepolling.com/trump-holds-edge-over-biden-in-seven-key-swing-state-polls/)
- [Emerson College: conducted March](https://emersoncollegepolling.com/category/state-poll/)
- [New York Times/Sienna: conducted May](https://www.nytimes.com/interactive/2024/05/13/us/elections/times-siena-poll-registered-voter-crosstabs.html)
- [Wall Street Journal: conducted March ]((https://s.wsj.net/public/resources/documents/WSJ_Swing_States_Partial_March_2024.pdf))

---

*Single State*

* Arizona
- [Cook Political Report: conducted May](https://www.cookpolitical.com/survey-research/2024-swing-state-project/23May2024-toplines)
- [Fox News: conducted March](https://static.foxnews.com/foxnews.com/content/uploads/2024/03/Fox_March-7-11-2024_Arizona_Topline_March-13-Release.pdf)
- [CBS: conducted May](https://www.scribd.com/document/733845819/cbsnews-20240519-AZ-1-SUN#1fullscreen=1)
- [Nobel Predictive Insights: conducted May](https://www.scribd.com/document/733845819/cbsnews-20240519-AZ-1-SUN#1fullscreen=1)
* Georgia
- [Cook Political Report; conducted May](https://www.cookpolitical.com/survey-research/2024-swing-state-project/unique-election-driven-traditional-issue)
- [Fox News: conducted April](https://static.foxnews.com/foxnews.com/content/uploads/2024/04/Fox_April-11-16-2024_GEORGIA_Topline_April-18-Release-1.pdf)
* Michigan
- [CBS: conducted in April](https://www.scribd.com/document/727317994/Cbsnews-20240428-MI-SUN)
Expand All @@ -64,14 +70,16 @@ df = CSV.read(IOBuffer(csv_data), DataFrame)
- [Franklin & Marshall College Poll: conducted March](https://www.fandmpoll.org/franklin-marshall-poll-release-april-2024)
* North Carolina
- [Marist: conducted March ](https://maristpoll.marist.edu/wp-content/uploads/2024/03/Marist-Poll_North-Carolina-NOS-and-Tables_202403181357.pdf)
- [Highpoint University: conducted March](https://www.highpoint.edu/src/files/2023/08/102memo.pdf)\
- [Highpoint University: conducted March](https://www.highpoint.edu/src/files/2023/08/102memo.pdf)
- [Highpoint University: conducted May](https://www.highpoint.edu/src/files/2023/08/103memo.pdf)
- [Mason-Dixon: conducted April](https://thehill.com/homenews/campaign/4603458-trump-leads-biden-in-north-carolina-poll/)
- [Quinnipiac: conducted April](https://poll.qu.edu/images/polling/nc/nc04102024_ncaa99.pdf)
- [WRAL: conducted March](https://wwwcache.wral.com/asset/news/state/nccapitol/2024/03/12/21325738/3247050-Poll_Report_-_PollPrint-DMID1-628w54pob.pdf)
* Wisconsin
- [CBS: conducted April](https://www.scribd.com/document/727319278/Cbsnews-20240428-WI-SUN)
- [Fox News: conducted April](https://static.foxnews.com/foxnews.com/content/uploads/2024/04/b002d3b3-Fox_April-11-16-2024_WISCONSIN_Topline_April-18-Release.pdf)
- [Quinnipiac conducted May](https://poll.qu.edu/images/polling/wi/wi05082024_wizz76.pdf)

---
[^3]: Results selected for analysis here are for two-way preference questions if asked, except in cases in which a third-party candidate qualified for the ballot prior to poll. For polls with only multiple choices in addition to Biden and Trump, their respective percentages of responses were recorded. In all cases those percentages were normalized to 100% to reflect the relative, not absolute, support of the two candidates.
---
Expand Down

0 comments on commit f3f813c

Please sign in to comment.