Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.predict.ideal

plot methods for predictions from ideal objects


Description

Plot classification success rates by legislators, or by roll calls, using predictions from ideal.

Usage

## S3 method for class 'predict.ideal'
plot(x, type = c("legis", "votes"),...)

Arguments

x

an object of class predict.ideal.

type

string; one of legis or votes.

...

further arguments passed to or from other methods.

Details

type="legis" produces a plot of the “percent correctly predicted” for each legislator/subject (using the classification threshold set in predict.ideal) against the estimated ideal point of each legislator/subject (the estimated mean of the posterior density of the ideal point), dimension at a time. If the legislators' party affiliations are available in the rollcall object that was passed to ideal, then legislators from the same party are plotted with a unique color.

type="votes" produces a plot of classification rates for each roll call, by the percentage of legislators voting for the losing side. The x-ordinate is jittered for clarity.

Value

After drawing plots on the current device, exits silently returning invisible(NULL).

Author(s)

See Also

Examples

data(s109)
f = system.file("extdata","id1.rda",package="pscl")
load(f)
phat <- predict(id1)
plot(phat,type="legis")
plot(phat,type="votes")

pscl

Political Science Computational Laboratory

v1.5.5
GPL-2
Authors
Simon Jackman, with contributions from Alex Tahk, Achim Zeileis, Christina Maimone, Jim Fearon and Zoe Meers
Initial release
2020-02-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.