Learn R Programming

pscl (version 0.5)

plot1d: Plots 1 dimension of an ideal object

Description

Plots the posterior means of legislator ideal points and confidence intervals for a specified dimension of an ideal object.

Usage

plot1d(x, d=1, conf.int=0.95, start=rownames(x$x)[1],
       showAllNames = FALSE, ...)

Arguments

x
an object of class ideal
d
the number of the dimension to plot; only meaningful when x was fit with d > 1
conf.int
for link{ideal} objects fit with d=1 dimension, the size of the confidence interval to plot around the estimated posterior mean for each legislator's ideal point
start
the number of the iteration with which to begin when calculating the posterior mean and confidence interval
showAllNames
logical, if TRUE, the vertical axis will the names of all legislators. Default is FALSE to reduce clutter on typical-sized graph.
...
other parameters to be passed through to plotting functions

Details

plot.ideal() produces a plot of the posterior mean of the ideal point estimations for each legislator with a confidence interval. If there are more than 30 legislators, only 30 points on this graph will be labelled. If party information is available in the rollcall object contained in the ideal object, legislators from different parties are plotted in different colors.

See Also

ideal, plot.ideal, plot2d

Examples

Run this code
data(s109)
id1 <- ideal(s109,
             d=1,
             meanzero=TRUE,
             store.item=TRUE,
             maxiter=1000,
             burnin=100,
             thin=10)  

plot(id1)  ## same as plot1d(id1) for d=1
plot(id1,showAllNames=TRUE)

## long run, too long for examples
idLong <- ideal(s109,
                d=1,
                meanzero=TRUE,
                store.item=TRUE,
                maxiter=251e3,
                burnin=1000,
                thin=1e3)  

pdf(file="s109.pdf",
    paper="special",
    height=16,width=8.5)   ## big graphing area
plot(idLong,showAllNames=TRUE)
dev.off()

Run the code above in your browser using DataLab