Ero sivun ”Venäjän vaalit 2011” versioiden välillä
pEi muokkausyhteenvetoa |
(R-analyysikoodia lisätty) |
||
| Rivi 38: | Rivi 38: | ||
* Data löytyy täältä: http://peregrins.com/elect/results.csv.gz | * Data löytyy täältä: http://peregrins.com/elect/results.csv.gz | ||
==Tilastoanalyyseja== | |||
'''Tässä on vaalidatasta tehtyjä tilastoajoja ja regressioanalyysiä. Sinun ei tarvitse ajaa mallia uudestaan (se kestää muutamia minuutteja), koska tulokset löytyvät valmiiksi laskettuna tästä: [http://fi.opasnet.org/fi_wiki/index.php/Special:R-tools?id=2Z3bmKA4kkE4itV] | '''Tässä on vaalidatasta tehtyjä tilastoajoja ja regressioanalyysiä. Sinun ei tarvitse ajaa mallia uudestaan (se kestää muutamia minuutteja), koska tulokset löytyvät valmiiksi laskettuna tästä: [http://fi.opasnet.org/fi_wiki/index.php/Special:R-tools?id=2Z3bmKA4kkE4itV] | ||
| Rivi 222: | Rivi 223: | ||
</rcode> | </rcode> | ||
=== Straightforward model === | |||
The analysis programs get progressively more sophisticated as you scroll down the page. This is the simplest analysis model which basically allows you to filter the data and make some nice plots. You can compare the statistics of different parties in different regions of Russia. We will upload the data file into the Opasnet data base so that you can simply run the program by pressing the button below (does not work quite yet! In the meanwhile you can install R on your own computer and download the input data file from the bottom of the page manually.) | |||
<rcode> | |||
# Read input file | |||
# | |||
election <- read.table(file="~/Duuma2011/results.csv", sep=",") | |||
# Check how many regional units there are. First find min and max | |||
# | |||
min(election[,1]); max(election[,1]) | |||
# returns 1, 99 | |||
# | |||
# Then check if there are numbers missing between min and max is missing: | |||
# | |||
av22 <- 1:99; for(i in 1:99) {av22[[i]] <- as.numeric(any(election[,1] == i))}; av22 | |||
# | |||
# Missing regional codes are | |||
# | |||
missing <- which(av22 == 00) | |||
# This gives missing = (41 59 75 80 81 82 84 85 88 93 94 95 96 97 98) | |||
# | |||
# Accepted regional codes are | |||
# | |||
av23 <- av22*(1:99); accepted <- av23[av23 !=0] | |||
# Check how many commissions there are in a state (in the largest enumerated | |||
# regional unit) | |||
# | |||
av <- c(rep(0,99)); for(i in 1:length(av)) {av[[i]] <- sum(as.numeric(election[,1] == i))} | |||
# | |||
# as a check, indeed sum(av) = dim(election)[1] | |||
# Remove zeroes: | |||
# | |||
avr <- av[av !=0] | |||
# Form vector bv that contains the end points of each interval (all | |||
# commissions in a region). | |||
# | |||
# Max values of intervals | |||
# | |||
bF <- list(1:length(avr)); for(i in 1:length(avr)) {bF[[i]] <- avr[[i]]}; for(i in 2:length(avr)) {bF[[i]] <- bF[[i]] + bF[[i-1]]} | |||
# | |||
# Min values of intervals: | |||
# | |||
bB <- list(1:length(avr)); for(i in 2:length(avr)) {bB[[i]] <- bF[[i-1]] + 1}; bB[[1]] <- 1 | |||
# | |||
# Form intervals: | |||
# | |||
intervals <- list(1:length(avr)); for(i in 1:length(avr)) {intervals[[i]] <- c(bB[[i]], bF[[i]])}; intervals <- unlist(intervals) | |||
# List of names of the regions to be analyzed | |||
# | |||
regnames <- election[intervals,2] | |||
# Rows 13 and 14 will be used for estimating the number of cast votes (valid | |||
# and invalid cast ballots), row 5 gives the total number of voters. | |||
# Voting activity (includes state-level averages associated with no polling | |||
# station. Should not matter because it will contribute to the center | |||
# of the distribution function) | |||
# | |||
# Mark locations with less voters than 50 (1193 polling stations) | |||
# | |||
mark <- which(election[,5] < 50) | |||
# | |||
normalization <- election[,5] | |||
# normalization[mark] <- 1000000000 | |||
# | |||
# Compute voting activity: | |||
# | |||
Activity <- 100*(election[,13] + election[,14])/normalization | |||
# Bin the results | |||
# | |||
bin.info <- seq(0,100,0.5) | |||
hist(Activity, breaks=bin.info) | |||
# Determine results by party | |||
# | |||
ActivityJR <- 100*election[,23]/normalization | |||
ActivityLD <- 100*election[,24]/normalization | |||
ActivityPR <- 100*election[,25]/normalization | |||
ActivityCR <- 100*election[,26]/normalization | |||
ActivityYAB <- 100*election[,27]/normalization | |||
ActivityUR <- 100*election[,28]/normalization | |||
ActivityCAR <- 100*election[,29]/normalization | |||
# Plotting results for 4 largest parties | |||
# | |||
par(mfrow=c(4,1)) | |||
hist(ActivityJR, breaks=bin.info) | |||
hist(ActivityLD, breaks=bin.info) | |||
hist(ActivityCR, breaks=bin.info) | |||
hist(ActivityUR, breaks=bin.info) | |||
# Results for individual areas | |||
# The allowed region codes can be obtained from the variable 'accepted' | |||
# calculated above. Their meaning can be obtained from the page | |||
# 'Hallintoalueet_Duuma_2011' of Opasnet. For convinience, they are given | |||
# below: | |||
# 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |||
# 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 45 46 47 | |||
# 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 | |||
# 72 73 74 76 77 78 79 83 86 87 89 90 91 92 99 | |||
# Regional influences can be studied by substituting for N below a number | |||
# from the list above: | |||
# | |||
# regNcol <- which(election[,1] == N); electionN <- election[regNcol,] | |||
# | |||
# Automating the calculation for different regions | |||
ActivityJRregion <- list(1:length(accepted)); | |||
ActivityLDregion <- list(1:length(accepted)); | |||
ActivityPRregion <- list(1:length(accepted)); | |||
ActivityCRregion <- list(1:length(accepted)); | |||
ActivityYABregion <- list(1:length(accepted)); | |||
ActivityCARregion <- list(1:length(accepted)); | |||
for(i in 1:length(accepted)) {regNcol <- which(election[,1] == accepted[[i]]); | |||
normalization <- election[regNcol,5]; | |||
ActivityJRregion[[i]] <- 100*election[regNcol,23]/normalization; | |||
ActivityLDregion[[i]] <- 100*election[regNcol,24]/normalization; | |||
ActivityPRregion[[i]] <- 100*election[regNcol,25]/normalization; | |||
ActivityCRregion[[i]] <- 100*election[regNcol,26]/normalization; | |||
ActivityYABregion[[i]] <- 100*election[regNcol,27]/normalization; | |||
ActivityURregion[[i]] <- 100*election[regNcol,28]/normalization; | |||
ActivityCARregion[[i]] <- 100*election[regNcol,29]/normalization} | |||
</rcode> | |||
===Hierarchial Bayesian model=== | ===Hierarchial Bayesian model=== | ||
Versio 20. joulukuuta 2011 kello 03.33
Tämä sivu on tutkimus.
Sivutunniste: Op_fi2768 |
|---|
| Moderaattori:Jouni (katso kaikki)
Sivun edistymistä ei ole arvioitu. Arvostuksen määrää ei ole arvioitu (ks. peer review). |
| Lisää dataa
|
Venäjän vaalit 2011 käsittelee duuman vaaleja 4.12.2011.
| Pääviesti |
|---|
| Kysymys:
Mitä päätelmiä voidaan tehdä Venäjän duuman vaalien tuloksista? Hallitsevana piirteenä tuloksissa on vaalipiirien tasolla näkyvä vahva yhteys Yhtenäisen Venäjän kannatuksen ja äänestysaktiivisuuden välillä. Vaikka pientä korrelaatiota voi olla rehellisissäkin vaaleissa, näyttää näissä vaaleissa korrelaatio niin vahvalta, ettei sitä voi selittää muuten kuin sillä, että uurniin on lisätty ylimääräisiä äänestyslippuja Yhtenäisen Venäjän hyväksi. Vaikutus näyttää huomattavan suurelta ja on se on lisännyt Yhtenäisen Venäjän kannatusta vaalien lopputuloksessa mahdollisesti jopa 10 - 15 prosenttiyksikköä todelliseen tilanteeseen nähden. Tarkkaa arviota vaikutuksesta ei tällä hetkellä ole. |
Kysymys
Mitä päätelmiä voi tehdä Venäjän duuman vaalien (4.12.2011) tuloksista?
Tulos
Hallitsevana piirteenä tuloksissa on vaalipiirien tasolla näkyvä vahva yhteys Yhtenäisen Venäjän kannatuksen ja äänestysaktiivisuuden välillä. Vaikka pientä korrelaatiota voi olla rehellisissäkin vaaleissa, näyttää näissä vaaleissa korrelaatio niin vahvalta, ettei sitä voi selittää muuten kuin sillä, että uurniin on lisätty ylimääräisiä äänestyslippuja Yhtenäisen Venäjän hyväksi. Vaikutus näyttää huomattavan suurelta ja on se on lisännyt Yhtenäisen Venäjän kannatusta vaalien lopputuloksessa mahdollisesti jopa 10 - 15 prosenttiyksikköä todelliseen tilanteeseen nähden. Tarkkaa arviota vaikutuksesta ei tällä hetkellä ole.
Vaalien tulokset löytyvät Opasnet-kannasta: {{#opasnet_base_link:Op_fi2768}}
Tulokset ovat myös eri muodoissa sivun lopussa olevassa tiedostotaulukossa.
Vaalituloksista tehtyjä tilastoanalyysejä, joiden perusteella päätelmät on tehty: [1]
Perustelut
Blogikirjoituksia vaalien tilastoanalyyseistä
- Russian legislative elections 2011 - statistical evidence of vote fraud. (10.12.2011)
- Blogi: Venäjän vaalit - kusetuksen tilastollinen todentaminen (8.12.2011)
Vaalidataa eri lähteistä
- An election commission
- Äänestysdata Opasnet Basessa
- Data löytyy täältä: http://peregrins.com/elect/results.csv.gz
Tilastoanalyyseja
Tässä on vaalidatasta tehtyjä tilastoajoja ja regressioanalyysiä. Sinun ei tarvitse ajaa mallia uudestaan (se kestää muutamia minuutteja), koska tulokset löytyvät valmiiksi laskettuna tästä: [2]
You don't need to run the model (it will take a few minutes); see a pre-run result: [3]
Data format
This is an example data. The English version is translated with Google translator and may contain serious mistakes.
The election results Elections to the State Duma of the Federal Assembly of the Sixth Convocation Date of vote: 12/04/2011 Name of the Election Commission Babayevskaya Date and time of signing the protocol 5/12/2011 9:00:00 #Column Name Translation of topic V5 nVoters Number of voters included in voters list V6 nBallots The number of ballots received by the precinct election commission V7 nBallotsEarly The number of ballots issued to voters who voted early V8 nBallotsPolling The number of ballots issued to voters at the polling V9 nBallotsOutside The number of ballots issued to voters outside the polling station V10 nBallotsCanceled The number of canceled ballots V11 nBallotsMobile The number of ballots in mobile ballot boxes V12 nBallotsStationary The number of ballots in the stationary ballot boxes V13 nBallotsInvalid Number of invalid ballots V14 nBallotsValid Number of valid ballots V15 nAbsBallots The number of absentee ballots received by the precinct election commission V16 nAbsBallotsPolling The number of absentee ballots issued to voters at a polling station V17 nAbsBallotsVoted The number of voters who voted with absentee ballots at a polling station V18 nAbsBallotsUnused The number of the unused absentee ballots V19 nAbsBallotsTerr The number of absentee ballots issued to voters of the territorial election commission V20 nAbsBallotsLost Number of lost absentee ballots V21 nBallotsLost The number of lost ballots V22 nBallotsNotrec The number of ballots not recorded in obtaining V23 nVotesJustRussia 1. Political party JUST RUSSIA V24 nVotesLibDemocr 2. Political Party "Liberal Democratic Party of Russia" V25 nVotesPatriots 3. Political Party "PATRIOTS OF RUSSIA" V26 nVotesCommunist 4. Political party "Communist Party of the Russian Federation" V27 nVotesUniDemocr 5. A political party "Russian United Democratic Party" Yabloko " V28 nVotesUniRussia 6. All-Russian Political Party "UNITED RUSSIA" V29 nVotesCaseRight 7. All-Russian Political Party "CASE RIGHT"
Original text
Версия для печати Сводная таблица результатов выборов Выборы депутатов Государственной Думы Федерального Собрания Российской Федерации шестого созыва Дата голосования: 04.12.2011 Наименование Избирательной комиссии Бабаевская Сводная таблица результатов выборов Сумма 1 Число избирателей, внесенных в список избирателей 18947 2 Число избирательных бюллетеней, полученных участковой избирательной комиссией 17294 3 Число избирательных бюллетеней, выданных избирателям, проголосовавшим досрочно 0 4 Число избирательных бюллетеней, выданных избирателям в помещении для голосования 9001 5 Число избирательных бюллетеней, выданных избирателям вне помещения для голосования 1761 6 Число погашенных избирательных бюллетеней 6532 7 Число избирательных бюллетеней в переносных ящиках для голосования 1761 8 Число избирательных бюллетеней в стационарных ящиках для голосования 8995 9 Число недействительных избирательных бюллетеней 201 10 Число действительных избирательных бюллетеней 10555 11 Число открепительных удостоверений, полученных участковой избирательной комиссией 795 12 Число открепительных удостоверений, выданных избирателям на избирательном участке 549 13 Число избирателей, проголосовавших по открепительным удостоверениям на избирательном участке 346 14 Число погашенных неиспользованных открепительных удостоверений 246 15 Число открепительных удостоверений, выданных избирателям территориальной избирательной комиссией 94 16 Число утраченных открепительных удостоверений 0 17 Число утраченных избирательных бюллетеней 0 18 Число избирательных бюллетеней, не учтенных при получении 0 19 1. Политическая партия СПРАВЕДЛИВАЯ РОССИЯ 20 2. Политическая партия "Либерально-демократическая партия России" 21 3. Политическая партия "ПАТРИОТЫ РОССИИ" 22 4. Политическая партия "Коммунистическая партия Российской Федерации" 23 5. Политическая партия "Российская объединенная демократическая партия "ЯБЛОКО" 24 6. Всероссийская политическая партия "ЕДИНАЯ РОССИЯ" 25 7. Всероссийская политическая партия "ПРАВОЕ ДЕЛО"
Data handling
Note! The code does not work online, because a data file is needed. This code was used to upload the result version act_id = 3437.
Straightforward model
The analysis programs get progressively more sophisticated as you scroll down the page. This is the simplest analysis model which basically allows you to filter the data and make some nice plots. You can compare the statistics of different parties in different regions of Russia. We will upload the data file into the Opasnet data base so that you can simply run the program by pressing the button below (does not work quite yet! In the meanwhile you can install R on your own computer and download the input data file from the bottom of the page manually.)
Hierarchial Bayesian model
The model does not work yet.
- Model file: file:RussianElections2011.ods.

Constants:
nComm = number of electoral commissions (97000)
nParty = number of political parties in the election (7)
nVoters[i] = number of eligible votes in each electoral commission.
Activity[i] = voting activity for each electoral commission. Described as
Beta distribution with parameters ActA (alpha) and ActB (beta).
nHonest[i] = number of honest votes in electoral commission i. Described as
binomial distribution with parameters nVoters[i] (n) and Activity[i] (p).
support[j] = True nation-wide support of party j. Described as
Dirichlet distribution with parameter alpha[j] (alpha)
nTotal[i,j] = Number of votes for party j in electoral commission i. This is observed and based on election data.
nHonest[i,j] = Number of honest votes to a party j in an electoral commission j. Described as
multinomial distribution using parameter support[i] (Dirichlet).
pFabr[i,j] = Probability that there are fabricated votes for party j in electoral commission i. Described as
beta distribution with parameters 0.01 (alpha) and 10 (beta).
Fabr[i,j] Bernoulli distribution as a realisation whether there was fabrication or not.
nFabr[i,j] = Number of fabricated votes for party j in electoral commission i.
If Fabr[i,j] is 1, then nTotal[i,j] - nHonest[i,j], else 0.
model{
for( j in 1 : nParty ) {
for( i in 1 : nComm ) {
Fabr[j , i] ~ dbern(pFabr[j , i])
nVotes[j , i] ~ dbin(0.0, 1.0E-6)
pFabr[j , i] ~ dbeta(0.01, 10)
nFabr[j , i] <- Fabr[j , i] * (nVotes[j , i] - nHonest2[j , i])
}
}
for( i in 1 : nComm ) {
Activity[i] ~ dbeta(ActA, ActB)C(0,1)
nHonest2[1:nParty, i] ~ dmulti(support[1:nParty], nHonest[i])
nHonest[i] ~ dbin(Activity[i], nVoters[i])
}
for( j in 1 : nParty ) {
alpha[j] ~ dunif(0.001, 10000)
support[j] ~ ddirich(alpha[j])
}
ActA ~ dunif(1, 1000)
ActB ~ dunif(1, 1000)
}
⇤#: The compilation of the model produces this error message: "vector-valued relation nHonest2 must involve consecutive elements of variable." Who can help to sort this out? --Jouni Tuomisto 19. joulukuuta 2011 kello 15.30 (EET)
Preliminary code for running the model using BRugs.
Katso myös
Aiheeseen liittyviä tiedostoja
Vaalien tulokset äänestysalueittain.
<mfanonymousfilelist></mfanonymousfilelist>