generateTestData is the function that generates a rollcall object used to
test wnominate. The description of the result below is copied from the
documentation of package pscl, written by Simon Jackman.generateTestData(legislators=20, rcVotes=100,
yea=matrix(runif(rcVotes,min=-0.2,max=0.7),nrow=rcVotes),
nay=matrix(runif(rcVotes,min=-0.7,max=0.2),nrow=rcVotes),
ideal=matrix(rnorm(legislators),nrow=legislators),
Beta=15, dimweight=0.5,normal=1, seed = NULL, utility='nominate')rollcallm indicating dropped vote. This is
recomputed in wnominate and is never used.dat<-generateTestData()
result<-wnominate(dat,polarity=c(1,2))
summary(result)
plot(result)Run the code above in your browser using DataLab