Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > results <- c(47, 31, 11, 7, 2.3, 0.7, 0.3, 0.1, 0, 0.4)
- > results / 100 * 767
- [1] 360.490 237.770 84.370 53.690 17.641 5.369 2.301 0.767 0.000 3.068
- >
- > num_people <- round(results / 100 * 767) # approximate, as these are only weighted results
- >
- > s <- sapply(num_people, function(x) { round(binom.test(x, 767)$conf.int*100,1) })
- > colnames(s) <- c("Nat", "Lab", "Green", "NZF", "Cons", "Maori", "Act", "United", "Mana", "Other")
- > rownames(s) <- c("Lower", "Upper")
- >
- > s
- Nat Lab Green NZF Cons Maori Act United Mana Other
- Lower 43.4 27.8 8.8 5.3 1.4 0.2 0.0 0.0 0.0 0.1
- Upper 50.5 34.4 13.4 9.1 3.7 1.5 0.9 0.7 0.5 1.1
- >
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement