Learn R Programming

oc (version 0.07)

oc: Optimal Classification Roll Call Scaling

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's pscl package.
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
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
verbose
logical, indicates whether bills and legislators to be deleted should be printed while data is being checked before ideal points are estimated.

Value

  • An object of class OCobject, with elements as follows:
  • legislatorsdata frame, containing all data from the old perf25.dat file about legislators. For a typical ocObject run with an ORD file read using readKH, it will contain the following:
    • state
    {State name of legislator.} icpsrState{ICPSR state code of legislator.} cd{Congressional District number.} icpsrLegis{ICPSR code of legislator.} party{Party of legislator.} partyCode{ICPSR party code of legislator.} rank{Rank ordering of legislator on the first dimension, from lowest to highest.} correctYea{Predicted Yeas and Actual Yeas.} wrongYea{Predicted Yeas and Actual Nays.} wrongNay{Predicted Nays and Actual Yeas.} correctNay{Predicted Nays and Actual Nays.} volume{Measure of the legislator's polytope size.} coord1D{First dimension OC score, with all subsequent dimensions numbered similarly.}

item

  • rollcalls
  • wrongYea
  • wrongNay
  • correctNay
  • PRE
  • normvector1D
  • midpoints
  • dimensions
  • eigenvalues
  • fits

code

readKH

itemize

  • correctYea

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/

See Also

'plot.OCobject','summary.OCobject'.

Examples

Run this code
#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<-oc(sen90,dims=2,polarity=c(7,2))
    summary(result)
    plot(result)

Run the code above in your browser using DataLab