plots an ideal object
Plot of the results of an ideal point estimation contained
in an object of class ideal
.
## S3 method for class 'ideal' plot(x, conf.int=0.95, burnin=NULL, ...) plot1d(x, d=1, conf.int=0.95, burnin=NULL, showAllNames = FALSE, ...) plot2d(x, d1=1, d2=2, burnin=NULL, overlayCuttingPlanes=FALSE, ...)
x |
an object of class |
conf.int |
for "ideal" objects with 1 dimension estimated, the
level of the confidence interval to plot around the
posterior mean for each legislator. If 2 or more dimensions were
estimated, |
d |
integer, which dimension to display in a 1d plot, if the object is a multidimensional ideal object |
.
burnin |
of the recorded MCMC samples, how many to discard as
burnin? Default is |
showAllNames |
|
d1 |
integer, the number of the first dimension to plot when
plotting multi-dimensional |
d2 |
integer, the number of the second dimension to plot when
plotting multi-dimensional |
overlayCuttingPlanes |
logical, if |
... |
other parameters to be passed through to plotting functions. |
If the ideal
object comes from fitting a d=1
dimensional model, then plot.ideal
plots the mean of the
posterior density over each legislator's ideal point, accompanied by a
conf.int
confidence interval. In this case, plot.ideal
is simply a wrapper function to plot1d
.
If the ideal
object has d=2
dimensions, then
plot2d
is called, which plots the (estimated) mean of
the posterior density of each legislator's ideal point (i.e., the
ideal point/latent trait is a point in 2-dimensional Euclidean space,
and the posterior density for each ideal point is a bivariate
density). Single dimension summaries of the estimated ideal points
(latent traits) can be obtained for multidimensional
ideal
objects by passing the ideal
object
directly to plot1d
with d
set appropriately.
For unidimensional and two-dimensional models, if party information is
available in the rollcall
object contained in the ideal
object, legislators from different parties are plotted in different
colors. If the ideal
object has more than 2 dimensions,
plot.ideal()
produces a matrix of plots of the mean ideal
points of each dimension against the posterior mean ideal points of
the other dimensions.
When specifying a value of burnin
different from that used
in fitting the ideal
object, note a distinction
between the iteration numbers of the stored iterations, and the
number of stored iterations. That is, the n
-th iteration
stored in an ideal
object will not be iteration
n
if the user specified thin>1
in the call to
ideal
. Here, iterations are tagged with their
iteration number. Thus, if the user called ideal
with
thin=10
and burnin=100
then the stored iterations are
numbered 100, 110, 120, ...
. Any future subsetting via a
burnin
refers to this iteration number.
## Not run: data(s109) id1 <- ideal(s109, d=1, normalize=TRUE, store.item=TRUE, maxiter=500, ## short run for examples burnin=100, thin=10) plot(id1) id2 <- ideal(s109, d=2, store.item=TRUE, maxiter=11e2, burnin=1e2, verbose=TRUE, thin=25) plot(id2,overlayCuttingPlanes=TRUE) id2pp <- postProcess(id2, constraints=list(BOXER=c(-1,0), INHOFE=c(1,0), CHAFEE=c(0,.25))) plot(id2pp,overlayCuttingPlanes=TRUE) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.