# # This software has been released to the Public Domain, # for a license text see # http://creativecommons.org/licenses/publicdomain/ # # You need GNU R to use this software, see # http://www.r-project.org/ # # The data file ooxmlvote.csv contains the following columns in comma # separated format: # "Country" Name of the country # "CPI06" Transparency International's Corruption Perceptions Index # (CPI) 2006, see # http://www.transparency.org/policy_research/surveys_indices/cpi/2006 # "CPI07" Transparency International's Corruption Perceptions Index # (CPI) 2007, see # http://www.transparency.org/policy_research/surveys_indices/cpi/2007 # "Member" Member organization in a counntry # "Status" Status of the member: P member (incl. Secretariat) or O member # "Vote07" Vote in 2007 on acceptance of OOXML # "Vote08" Vote in 2008 on acceptance of OOXML # "Comment07" Comment file was submitted with the 2007 vote (TRUE/FALSE) # "Comment08" Comment file was submitted with the 2008 vote (TRUE/FALSE) V <- read.csv("http://www.effi.org/system/files?file=ooxmlvote.csv.txt") # P-Members include the Secretariat country (United States). pmembers <- (!is.na(V[,"Status"]) & (V[,"Status"]=="Secretariat" | V[,"Status"]=="P Member")) ################################################################## # Vote on 2 September 2007 # # P-Members voting 17 in favour out of 32 = 53% (requirement 66.66%) table(V[pmembers,"Vote07"]) # Abstention Approval Disapproval # 9 17 15 # Note 17+15=32 (abstentions are not counted) # Wilcoxon rank sum test for the hypothesis that countries that # were perceived corrupt were more likely to vote for approval # than disapproval. Statistical significance found (alpha=0.05). wilcox.test(V[pmembers & V[,"Vote07"]=="Approval","CPI07"], V[pmembers & V[,"Vote07"]=="Disapproval","CPI07"], alternative="less") # W = 77, p-value = 0.02921 # alternative hypothesis: true location shift is less than 0 # Member bodies voting: 18 negative votes out of 69 = 26% (requirement 25%) table(V[,"Vote07"]) # Abstention Approval Disapproval # 18 51 18 # Note: 51+18=69 (abstentions are not counted) # Wilcoxon rank sum test for the hypothesis that countries that # were perceived corrupt were more likely to vote for approval # than disapproval. Statistical significance found (alpha=0.05). wilcox.test(V[V[,"Vote07"]=="Approval","CPI07"], V[V[,"Vote07"]=="Disapproval","CPI07"], alternative="less") # W = 277.5, p-value = 0.008354 # alternative hypothesis: true location shift is less than 0 ################################################################## # Vote on 2 April 2008 # # P-Members voting 24 in favour out of 32 = 75% (requirement 66.66%) table(V[pmembers,"Vote08"]) # Abstention Approval Disapproval # 9 24 8 # Note 24+8=32 (abstentions are not counted) # Wilcoxon rank sum test for the hypothesis that countries that # were perceived corrupt were more likely to vote for approval # than disapproval. No statistical significance. wilcox.test(V[pmembers & V[,"Vote08"]=="Approval","CPI07"], V[pmembers & V[,"Vote08"]=="Disapproval","CPI07"], alternative="less") # W = 119.5, p-value = 0.8523 # alternative hypothesis: true location shift is less than 0 # Member bodies voting: 10 negative votes out of 71 = 14% (requirement 25%) table(V[,"Vote08"]) # Abstention Approval Disapproval # 16 61 10 # Note: 61+10=71 (abstentions are not counted) # Wilcoxon rank sum test for the hypothesis that countries that # were perceived corrupt were more likely to vote for approval # than disapproval. No statistical significance. wilcox.test(V[V[,"Vote08"]=="Approval","CPI07"], V[V[,"Vote08"]=="Disapproval","CPI07"], alternative="less") # W = 325, p-value = 0.6658 # alternative hypothesis: true location shift is less than 0 ################################################################## # Comparing 2007 and 2008 votes # The P-Member vote: table(V[pmembers,"Vote07"],V[pmembers,"Vote08"]) # Abstention Approval Disapproval # Abstention 6 3 0 # Approval 2 14 1 # Disapproval 1 7 7 # All votes: table(V[,"Vote07"],V[,"Vote08"]) # Abstention Approval Disapproval # Abstention 11 7 0 # Approval 4 45 2 # Disapproval 1 9 8 ################################################################## # Figure x <- matrix(c(table(factor(floor(V[V[,"Vote08"]=="Approval","CPI07"]), levels=2:9)), table(factor(floor(V[V[,"Vote08"]=="Disapproval","CPI07"]), levels=2:9))), nrow=2,ncol=8,byrow=TRUE, dimnames=list(c("approval","disapproval"),2:9)) barplot(x, main='"10 negative votes out of 71"', xlab="lots of corruption « CPI » little corruption", ylab="national body votes (except Fiji)", legend.text=c("approval","disapproval"))