#### Bavarian state elections 2018 - Evaluation of the forecasts

##### Comparison of the electoral results and forecasts for Bavarian elections 2018
Electoral forecast Bayesian Data visualization

(Check the forecast for the Bavarian state elections 2018.)

# Evaluation

The Bavarian state elections evaluated here were in October 14th, 2018, with the following results:

Party Election
CSU 37.2
SPD 9.7
FW 11.6
Grüne 17.5
Others 5.5
FDP 5.1
AfD 10.2
When overlapped with the forecasts, the result is shown in the following Figure:
Party Deviation (%) Election Forecast point estimate
AfD -17.84 10.2 12.02
SPD -14.85 9.7 11.14
FW 14.74 11.6 9.89
Others 14.73 5.5 4.69
CSU 11.40 37.2 32.96
FDP -5.88 5.1 5.40
Grüne -5.20 17.5 18.41

The forecast was off by 21 percent on the result of Die Linke, which was expected to be around 3.88%, but in fact was 3.2%, overestimating it. For AfD the pool of the polls was off by 17%, also with the polls overestimating their results. Then, for the SPD and FW the polls were of by 14%, but overestimating the first and underestimating the second. The CSU was also underestimated, by 11%. The FDP and the Grüne were both slightly underestimated by the forecast by around 5%, but within the intervals defined by a quite demanding uncertainty bands.

In fact, the two parties that will most likely form a coalition, CSU and FW, were both underestimated, whereas the SPD, the AfD and Die Linke were being given higher polls than the results.

Then, compared with any of the single polls, how does the model behave? In order to compare it, I simply add up all the squared percent deviations by party from each poll, for the polls with fieldwork ending within the 15 days before the election.

Poll Sum of squared deviation
Forschungsgruppe Wahlen 2018-10-11 1590.3
Model 1625.6
Civey 2018-10-10 1990.7
Forschungsgruppe Wahlen 2018-10-04 2594.0
Infratest dimap 2018-10-02 2638.2
INSA 2018-10-08 4015.6

The results show that the sum of the deviations from the pooling the polls model adds up to 1625 squared points, which is not far from the best estimate, which is at 1590 squared points, for the poll by “Forschungsgruppe Wahlen”, with 1075 survey respondents.

So, to sum up, from the perspective of concrete values for parties, only 2 out of 5 were forecasted within a reasonable margin of error (Grüne and FDP), 2 were underestimated (CSU and FW) and 3 overestimated (AfD, SPD and Linke).

However, the model performs in second position, at great distance of the rest of the polls but one. Of course forecasting election outcomes only by pooling several polls can not work better without better polls, but only taking into account information from polls, the model is clearly an advance. In addition to the mere forecasting, the model is also useful to produce reasonable quantities of interest that go beyond the mere point estimates, and it delivers them in terms of probabilities. Finally, the house effects are also a relevant sub-product worth researching to assess the quality of the individual polls.

Sys.time()
## [1] "2019-02-22 11:43:11 CET"

#### Creating video lessons for higher education: a tutorial on how to use OBS for teaching

##### Tutorial to create video lessons for higher education teaching: an example teaching RStudio using OBS
Data visualization

#### Creating video lessons for higher education: a tutorial on how to use OBS for teaching

##### Tutorial to create video lessons for higher education teaching: an example teaching RStudio using OBS
Data visualization

#### Comparison of Rhat versions: clarifying formulas for the potential scale reduction factor and its implications

##### Description of how to calculate Rhat (Potential Scale Reduction Factor) for Bayesian convergence usind different formulas, and its impact on the length of the chains
ggmcmc R Bayesian