Description Usage Arguments Note Author(s) References Examples
‘summary’ method for the class ‘ei’.
1 2 3 |
object |
|
... |
|
Used within ei_est_gen() function
Gary King <<email: king@harvard.edu>> and Molly Roberts <<email: roberts8@fas.harvard.edu>>
Gary King (1997). A Solution to the Ecological Inference Problem. Princeton: Princeton University Press.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # TOY DATA EXAMPLE
canda <- c(.1, .09, .85, .9, .92)
candb <- 1-canda
white <- c(.8, .9, .10, .08, .11)
black <- 1 - white
total <- c(30,80, 70, 20, 29)
toy <- data.frame(canda, candb, white, black, total)
# CREATE VECTORS
cands <- c("canda")
race_group <- c("~ black") # only use one group for example
table_names <- c("EI: PCT Black", "EI: PCT White")
# RUN ei_est_gen()
# KEEP DATA TO JUST ONE ROW FOR EXAMPLE (time) ONLY!
results <- ei_est_gen(cands, race_group, "total",
data = toy[c(1,3,5),], table_names = table_names, sample=100)
results
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.