Homework 14, POLS 8505: MEASUREMENT
THEORY
Due 30 November 2011
- In this problem we are going to try Lewis and Poole's Parametric Bootstrap with
WNOMINATE.
Download the R program:
- Run wnominate_bootstrap.r and turn in the plot that it makes.
- Report result$fits
.
- Turn in plot(result).
- Change the number of trials to 501 in:
result <- wnominate(hr, dims=2, trials=51, polarity=c(7,2))
repeat (a), (b), and (c).
Continuing with Lewis and Poole's Parametric Bootstrap with
WNOMINATE we are going to scale the 90th (1967-68) House and compare
it to the 90th Senate.
Download the R program:
- Run wnominate_bootstrap_h90.r and turn in the plot that it makes. Note that
this is a two panel plot.
- Report result$fits
.
Turn in plot(result).
Change the number of trials to 501 in:
result <- wnominate(hr, dims=2, trials=51, polarity=c(2,15))
repeat (a), (b), and (c).
In this problem we are going to compare Simon Jackman's
Ideal program for analyzing roll call data
with WNOMINATE.
Ideal is part of the
pscl package that has many nice routines
(see this pdf describing the package, 102 pages ).
Download the R program:
- Run ideal_90_senate_4.r and turn in the two plots that it makes. Note that one is
a two panel plot and another is a single panel plot.
- Report summary(result_id) (You do not need to report the ideal point summary;
just the overall summary with the ideal point means).
- Report summary(resultw), resultw$fits,
and resultw$weights.
- Report summary(olsideal2). Note that the command:
olsideal2 <-lm(distij ~ distideal1+distideal2 - 1)
is simple OLS with the intercept suppressed!! Report
cor(distij,distfix)^2
why is this number different than that reported in summary(olsideal2)?
Modify ideal_90_senate_4.r to analyze
hou90kh.ord, the 90th (1967-68) House Roll Call Data.
Note that you will need to change the labeling on all the plots! Call the program
ideal_90_house_4.r. Note that you will have to fix this command with three appropriately
chosen members of the 90th House:
result_id <- postProcess(result,constraints=list(MONDALE=c(-0.822,-0.043),THURMOND=c(0.994,-0.109),PERCY=c(-0.151,-0.988)))
Note that in wnominate_bootstrap_h90.r you write the NOMINATE coordinates to disk with this
command:
write.fwf(x=format(as.data.frame(result$legislators),digits=5,width=10,
scientific=FALSE),"c:/uga_course_homework_14/wnomtest_x_h90.txt")
Find two legislators who are near -1,0 and +1,0 to anchor the first dimension and find a third legislator who is near
0.0 on the first dimension but has a large 2nd dimension coordinate (either positive or negative).
Note that the three
names need to be unique because of a bug in Ideal.
- Repeat 3(a), 3(b), 3(c), and 3(d).