oc {oc}
Description
oc is the function that takes a rollcall object and estimates nonmetric Optimal Classification scores with them.
Usage
oc(rcObject, dims=2, minvotes=20, lop=0.025, polarity, verbose=FALSE)
Arguments
- rcObject
- An object of class
rollcall, from Simon Jackman'spsclpackage. - dims
- integer, number of dimensions to estimate. Must be nonnegative and cannot exceed 10 dimensions.
- minvotes
- minimum number of votes a legislator must vote in for them to be analyzed.
- lop
- A proportion between 0 and 1, the cut-off used for excluding lopsided votes, expressed as the proportion of non-missing votes on the minority side. The default,
lop=0.025, eliminates votes where the minority is smaller than 2.5 overwrites thelopsidedattribute in the RC object inputted. - polarity
- a vector specifying the legislator in the data set who is conservative on each dimension. For example,
c(3,5)indicates legislator 3 is conservative on dimension 1, and legislator 5 is conservative on dimension 2. Alternatively, polarity can be specified as a string for legislator names found inlegis.names(ie.c("Bush", "Gore")) if every legislative name in the data set is unique. Finally, polarity can be specified as a list (ie.list("cd",c(4,5))) where the first list item is a variable from the roll call object'slegis.data, and the second list item is a conservative legislator on each dimension as specified by the first list item.list("cd",c(4,5))thus specifies the legislators with congressional district numbers of 4 and 5. - verbose
- logical, indicates whether bills and legislators to be deleted should be printed while data is being checked before ideal points are estimated.
Values
An object of class OCobject, with elements as follows:
- legislators
- data frame, containing all data from the old
perf25.datfile about legislators. For a typicalocObjectrun with an ORD file read usingreadKH, it will contain the following:stateState name of legislator.icpsrStateICPSR state code of legislator.cdCongressional District number.icpsrLegisICPSR code of legislator.partyParty of legislator.partyCodeICPSR party code of legislator.rankRank ordering of legislator on the first dimension, from lowest to highest.correctYeaPredicted Yeas and Actual Yeas.wrongYeaPredicted Yeas and Actual Nays.wrongNayPredicted Nays and Actual Yeas.correctNayPredicted Nays and Actual Nays.volumeMeasure of the legislator's polytope size.coord1DFirst dimension OC score, with all subsequent dimensions numbered similarly.
- rollcalls
- data frame, containing all data from the old
perf21.datfile about bills. For a typicalOCobjectobject run with an ORD file read usingreadKH, it will contain the following:correctYeaPredicted Yeas and Actual Yeas.wrongYeaPredicted Yeas and Actual Nays.wrongNayPredicted Nays and Actual Yeas.correctNayPredicted Nays and Actual Nays.PREProportional Reduction In Error.normvector1DFirst dimension of the unit normal vector, with all subsequent dimensions numbered similarly.midpointsThe projection of the normal vector needed to get the midpoint.
- dimensions
- integer, number of dimensions estimated.
- eigenvalues
- A vector of roll call eigenvalues.
- fits
- A vector of length 2 with the classic measures of fit, containing the percent correct classification and the APRE.
References
Keith Poole. 2000. 'Non-parametric Unfolding of Binary Choice Data.' Political Analysis, 8(3):211-237
Keith Poole. 2005. 'Spatial Models of Parliamentary Voting.' Cambridge: Cambridge University Press.
Keith Poole. http://voteview.ucsd.edu/ "> http://voteview.ucsd.edu/
See Also
'plot.OCobject','summary.OCobject'.
Examples
#This data file is the same as reading file using: #sen90 <- readKH("ftp://voteview.com/sen90kh.ord") #All ORD files can be found on <a href="http://www.voteview.com<br /> " title="www.voteview.com<br /> ">www.voteview.com<br /> </a> data(sen90) summary(sen90) result<-oc(sen90,dims=2,polarity=c(7,2)) summary(result) plot(result)
Documentation reproduced from package oc, version 0.93. License: GPL-2
