summary.ei: Summarize Ecological Inference Estimates

Description Usage Arguments Note Author(s) References Examples

Description

‘summary’ method for the class ‘ei’.

Usage

1
2
3
## S3 method for class 'ei'
## S3 method for class 'ei'
summary(object, ...)

Arguments

object

object An ei object from the function ei.

...

... A list of options to return in graphs. See values below.

Note

Used within ei_est_gen() function

Author(s)

Gary King <<email: king@harvard.edu>> and Molly Roberts <<email: roberts8@fas.harvard.edu>>

References

Gary King (1997). A Solution to the Ecological Inference Problem. Princeton: Princeton University Press.

Examples

 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

lorenc5/eiCompare documentation built on June 5, 2019, 5:18 p.m.