tracex(object, legis=NULL, d=1, conf.int=0.95,
showAll = FALSE, start=rownames(object$x)[1])
ideal
.partial matches
of the names as given in the
dimnames
of object$x
.TRUE
and length(d)==2
,
display traces for all selected legislators' ideal points on
the one plot.legis
. For d=1
, each trace plot includes a
trace over iterations, the cumulative mean, a moving average, the
MCMC-based estimate of the mean of the posterior, and a confidence
interval (specified by conf.int
) around the mean of the
posterior (using the estimated quantiles
) of
the respective MCMC iterates). All of these values are calculated
beginning with the iteration specified by start
. When d
is a vector of length two, a 2-dimensional trace plot is
displayed, with the d[1]
dimension on the horizontal axis, and
the d[2]
dimension on the vertical axis.
ideal
; pmatch
for matching
legislators' names.data(s109)
## short run for demo purposes only
id1 <- ideal(s109,
meanzero=TRUE,
maxiter=500,burnin=100,thin=10)
tracex(id1,legis="KENNEDY")
## n.b., no such legislator has Horrendous Goblin
tracex(id1,legis=c("KENNEDY","BOXER","KYL","Horrendous Goblin"))
id2 <- ideal(s109,
d=2,
maxiter=5000, ## short run, and unidentified!
burnin=500,
thin=50)
tracex(id2,d=1,legis=c("KENNEDY","BOXER","KYL","Horrendous Goblin"))
tracex(id2,d=2,legis=c("KENNEDY","BOXER","KYL","Horrendous Goblin"))
tracex(id2,d=1:2,
legis=c("KENNEDY","BOXER","KYL","Horrendous Goblin"))
## partial matching
tracex(id2,d=1:2,
legis=c("KENN","BOX","BID","SNO","SPEC","MCCA","KYL",
"Horrendous Goblin"),
showAll=TRUE)
Run the code above in your browser using DataLab