wnominate: W-NOMINATE Roll Call Scaling

View source: R/wnominate.R

wnominateR Documentation

W-NOMINATE Roll Call Scaling

Description

wnominate is the function that takes a rollcall object and estimates Poole and Rosenthal W-NOMINATE scores with them.

Usage

wnominate(rcObject, ubeta=15, uweights=0.5, dims=2, minvotes=20,
        lop=0.025,trials=3, polarity, verbose=FALSE)                        

Arguments

rcObject

An object of class rollcall, from Simon Jackman's pscl package.

ubeta

integer, beta parameter for NOMINATE. It is strongly recommended that you do not change the default.

uweights

integer, weight parameter for NOMINATE. It is strongly recommended that you do not change the default.

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 the lopsided attribute in the RC object inputted.

trials

integer, number of bootstrap trials for standard errors. Any number set below 4 here will not return any standard errors. Setting this number to be large will slow execution of W-NOMINATE considerably.

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 in legis.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's legis.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.

Value

An object of class nomObject, which in this documentation is also referred to as a W-NOMINATE object.

legislators

data frame, containing all data from the old nom31.dat file about legislators. For a typical W-NOMINATE object 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.

  • correctYea Predicted Yeas and Actual Yeas.

  • wrongYea Predicted Yeas and Actual Nays.

  • wrongNay Predicted Nays and Actual Yeas.

  • correctNay Predicted Nays and Actual Nays.

  • GMP Geometric Mean Probability.

  • CC Correct Classification.

  • coord1D First dimension W-NOMINATE score, with all subsequent dimensions numbered similarly.

  • se1D Bootstrapped standard error of first dimension W-NOMINATE score, with all subsequent dimensions numbered similarly. This will be empty if trials is set below 4.

  • corr.1 Covariance between first and second dimension W-NOMINATE score, with all subsequent dimensions numbered similarly.

rollcalls

data frame, containing all data from the old nom33.dat file about bills. For a typical W-NOMINATE object run with an ORD file read using readKH, it will contain the following:

  • correctYea Predicted Yeas and Actual Yeas.

  • wrongYea Predicted Yeas and Actual Nays.

  • wrongNay Predicted Nays and Actual Yeas.

  • correctNay Predicted Nays and Actual Nays.

  • GMP Geometric Mean Probability.

  • PRE Proportional Reduction In Error.

  • spread1D First dimension W-NOMINATE spread, with all subsequent dimensions numbered similarly.

  • midpoint1D First dimension W-NOMINATE midpoint, with all subsequent dimensions numbered similarly.

dimensions

integer, number of dimensions estimated.

eigenvalues

A vector of roll call eigenvalues.

beta

The beta value used in the final iteration.

weights

A vector of weights used in each iteration.

fits

A vector of length 3*dimensions with the classic measures of fit. In order, it contains the correct classifications for each dimension, the APREs for each dimension, and the overall GMPs for each dimension.

Author(s)

Keith Poole ktpoole@uga.edu

Jeffrey Lewis jblewis@ucla.edu

James Lo lojames@usc.edu

Royce Carroll rcarroll@rice.edu

References

Keith Poole and Howard Rosenthal. 1997. 'Congress: A Political-Economic History of Roll Call Voting.' New York: Oxford University Press.

Jeffrey Lewis. https://voteview.com/

Keith Poole, Jeffrey Lewis, James Lo, and Royce Carroll. 2011. ‘Scaling Roll Call Votes with WNOMINATE in R.’ Journal of Statistical Software, 42(14), 1-21. https://www.jstatsoft.org/v42/i14/

See Also

'generateTestData','plot.nomObject','summary.nomObject'.

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 www.voteview.com
    data(sen90)
    
    summary(sen90)
    #sen90wnom <- wnominate(sen90,polarity=c(2,5))
    #'sen90wnom' is the same nomObject as found in 
    data(sen90wnom)
    summary(sen90wnom)
    plot(sen90wnom)

wnominate documentation built on June 22, 2024, 9:09 a.m.