data(s109)
cl2 <- constrain.legis(s109,
x=list("KENNEDY (D MA)"=c(-1,0),
"ENZI (R WY)"=c(1,0),
"CHAFEE (R RI)"=c(0,-.5)),
d=2)
## too long for examples
id2Constrained <- ideal(s109,
d=2,
priors=cl2, ## priors (w constraints)
startvals=cl2, ## start value (w constraints)
store.item=TRUE,
maxiter=5000,
burnin=500,
thin=25)
## short run for examples
id2Constrained <- ideal(s109,
d=2,
priors=cl2, ## priors (w constraints)
startvals=cl2, ## start value (w constraints)
store.item=TRUE,
maxiter=500,
burnin=100,
thin=10)
plot(id2Constrained)
plot(id2Constrained,
overlayCuttingPlanes=TRUE)
Run the code above in your browser using DataLab