plot.ei {ei} | R Documentation |
Plotting Ecological Inference Estimates
Description
‘plot’ method for the class ‘ei’.
Usage
## S3 method for class 'ei'
plot(x, ...)
Arguments
x |
An |
... |
A list of options to return in graphs. See values below. |
Details
Returns any of a set of possible graphical objects, mirroring those in the examples in King (1997).
Graphical option lci
is a logical value specifying the use of the Law of Conservation of Ink, where the implicit information in the data is represented through color gradients, i.e. the color of the line is a function of the length of the tomography line. This can be passed as an argument and is used for “tomogD” and “tomog” plots.
Value
tomogD |
Tomography plot with the data only. See Figure 5.1, page 81. |
tomog |
Tomography plot with ML contours. See Figure 10.2, page 204. |
tomogCI |
Tomography plot with |
tomogCI95 |
Tomography plot with |
tomogE |
Tomography plot with estimated mean posterior |
tomogP |
Tomography plot with mean posterior contours. |
betab |
Density estimate (i.e., a smooth version of a histogram) of point estimates of |
betaw |
Density estimate (i.e., a smooth version of a histogram) of point estimates of |
xt |
Basic |
xtc |
Basic |
xtfit |
|
xtfitg |
|
estsims |
All the simulated |
boundXb |
|
boundXw |
|
truth |
Compares truth to estimates at the district and precinct-level. Requires |
movieD |
For each observation, one tomography plot appears with the line for the particular observation darkened. After the graph for each observation appears, the user can choose to view the next observation (hit return), jump to a specific observation number (type in the number and hit return), or stop (hit "s" and return). |
movie |
For each observation, one page of graphics appears with
the posterior distribution of |
Author(s)
Gary King <<email: king@harvard.edu>> and Molly Roberts <<email: molly.e.roberts@gmail.com>>
References
Gary King (1997). A Solution to the Ecological Inference Problem. Princeton: Princeton University Press.
Examples
data(sample)
formula = t ~ x
dbuf <- ei(formula=formula, total="n",data=sample)
plot(dbuf, "tomog")
plot(dbuf, "tomog", "betab", "betaw", "xtfit")