Learn R Programming

pscl (version 0.5)

summary.rollcall: Summarize a rollcall object

Description

Provides a summary of the votes contained in a rollcall object.

Usage

## S3 method for class 'rollcall':
summary(object,
                 dropList=list(codes = "notInLegis", lop = 0),
                 verbose=FALSE,...)

## S3 method for class 'summary.rollcall': print(x, digits=1, ...)

Arguments

object
an rollcall object.
dropList
a list or alist, listing voting decisions, legislators and/or votes to be dropped from the summary; see dropRo
verbose
logical, if TRUE, compute legislator-specific and vote-specific Yea/Nay/NA summaries
x
an object of class summary.rollcall
digits
number of decimal places in printed display
...
further arguments passed to or from other methods.

Value

  • An object of class summary.rollcall with the following elements (depending on the logical flag verbose):
  • nnumber of legislators in the rollcall object, after processing the dropList
  • mnumber of roll call votes in the rollcall object, after processing the dropList
  • codesa list that describes how the voting decisions in the rollcall matrix (object$votes) map into Yea and Nay etc, after processing the dropList; see rollcall for more details
  • allVotesa matrix containing a tabular breakdown of all votes in the rollcall matrix (object$votes), after processing the dropList
  • partyTaba tabular breakdown of the legislators' party affiliations, after processing the dropList, and only if party affiliations are supplied asobject$legis.data$party; see rollcall for details
  • lopSideda tabular summary of the frequency of lop-sided roll call votes in the rollcall object, again, after processing the dropList
  • legisTaba tabular summary of each legislators' voting history
  • partyLoyaltythe proportion of times that each legislator votes the way that a majority of his or her fellow partisans did, provided party affiliations are available
  • voteTaba tabular summary of each rollcall's votes
  • callthe matched call used to invoke summary.rollcall

See Also

rollcall

Examples

Run this code
set.seed(314159265)
fakeData <- matrix(sample(x=c(0,1),size=1000,replace=TRUE),
                   10,100)
rc <- rollcall(fakeData)
rc

data(sc9497)
rc <- rollcall(sc9497)
summary(rc)

data(s109)
summary(s109)
summary(s109,verbose=TRUE)

Run the code above in your browser using DataLab