Tom Brunell
Professor of Political Science
Associate Dean of Graduate Education
School of Economic, Political and Policy Sciences
The University of Texas at Dallas
800 W. Campbell Road, GR 31
Richardson, TX 75080-3021
(972) 883-4963
http://www.utdallas.edu/~tbrunell
JudgeIt Folks,
While I am a JudgeIt veteran, I am definitely an R novice. I think I
got it to work on some recent election data, but the results are a bit
weird. Below I have pasted my code and some results. I have also
attached a seats votes curve for 2010. Eyeballing the graph would
lead me to believe there is a pro-Democratic bias of about 5%, but the
estimates for that year come in around 16 percent. 16 percent is very
high, so I don't think that is right. I assume I have made a mistake
here somewhere. Any advice would be greatly appreciated.
---------start code------------------
# House.R
# 20110804 : Initial version
rm(list = ls(all = TRUE))
library(JudgeIt)
nv10 <- read.csv(file="mpg11_EDLDNV10.csv", header=TRUE)
nv08 <- read.csv(file="mpg11_EDLDNV08.csv", header=TRUE)
nv06 <- read.csv(file="mpg11_EDLDNV06.csv", header=TRUE)
nv04 <- read.csv(file="mpg11_EDLDNV04.csv", header=TRUE)
nv02 <- read.csv(file="mpg11_EDLDNV02.csv", header=TRUE)
elections <- list("2002"=nv02, "2004"=nv04, "2006"=nv06, "2008"=nv08,
"2010"=nv10)
unc <- function(x) 1*(x>0.95)-1*(x<0.05)
judge.out <- judgeit(model.form=vote ~ inc +
unc
(vote
),vote
.formula=turnout~1,same.districts=T,use.last.votes=T,data=elections)
j.ob.10 <-bias.resp(judge.out,year=2010)
j.ob.10
seating <- seats(judge.out,mean.votes=seq(0.3,0.7,by=0.01),year=2010)
plot(seating)
______end code______
results for 2010
Mean
SD 2.5% 50% 97.5%
Partisan Bias (0.5) 0.1667088 0.02265697 0.11447372
0.1676165 0.2070548
Partisan Bias (0.45-0.55) 0.1429006 0.02012143 0.09972217
0.1444991 0.1807542
Responsiveness (0.45-0.55) 1.7342698 0.23440666 1.29864336 1.7258444
2.1483183
Responsiveness (observed) 1.0879783 0.23542207 0.71150988 1.0656005
1.5986896
Tom Brunell
Professor of Political Science
Associate Dean of Graduate Education
School of Economic, Political and Policy Sciences
The University of Texas at Dallas
800 W. Campbell Road, GR 31
Richardson, TX 75080-3021
(972) 883-4963
http://www.utdallas.edu/~tbrunell
--
JudgeIt mailing list served by Harvard-MIT Data Center
List Address: judgeit(a)lists.gking.harvard.edu
Subscribe/Unsubscribe: http://lists.gking.harvard.edu/?info=judgeit
JudgeIt Information: http://gking.harvard.edu/judgeit