wnominate is the function that takes a rollcall object and estimates Poole
and Rosenthal W-NOMINATE scores with them.wnominate(rcObject, ubeta=15, uweights=0.5, dims=2, minvotes=20,
lop=0.025,trials=3, polarity, verbose=FALSE)rollcall, from Simon Jackman's pscl package.lop=0.025, eliminates votes where the minority c(3,5) indicates legislator 3 is conservative
on dimension 1, and legislator 5 is conservative onnomObject, which in this documentation is also referred to
as a W-NOMINATE object.nom31.dat file about
legislators. For a typical W-NOMINATE object run with an ORD file read using
readKH, it will contain the following:
stateicpsrStatecdicpsrLegispartypartyCodecorrectYeawrongYeawrongNaycorrectNayGMPPREcoord1Dse1Dcorr.1wrongYeawrongNaycorrectNayGMPPREspread1Dmidpoint1DreadKHcorrectYea#This data file is the same as reading file using:
#sen90 <- readKH("ftp://voteview.com/sen90kh.ord")
#All ORD files can be found on www.voteview.com
data(sen90)
summary(sen90)
result<-wnominate(sen90,polarity=c(2,5))
#'result' is the same nomObject as found in
#data(sen90nomObject)
summary(result)
plot(result)Run the code above in your browser using DataLab