preprocess_rollcall {pumBayes}R Documentation

Preprocess Roll Call Data

Description

This function is used to preprocess roll call data for analysis. It allows users to remove legislators, combine legislators with specified indices, exclude lopsided votes based on minority voting proportions, and filter out legislators with excessive missing votes.

Usage

preprocess_rollcall(
  x,
  data_preprocess = list(leg_rm = NULL, combine_leg_index = NULL, combine_leg_party =
    NULL, lop_leg = 0.6, lop_issue = 0)
)

Arguments

x

A roll call object.

data_preprocess

A list of parameters for preprocessing data:

  • 'leg_rm' (default = NULL): A vector of indices specifying legislators to be removed.

  • 'combine_leg_index' (default = NULL): A list of vectors where each vector specifies the indices of legislators to be combined.

  • 'combine_leg_party' (default = NULL): A vector specifying the party affiliations for combined legislators.

  • 'lop_leg' (default = 0.6): A threshold indicating the maximum allowable proportion of missing votes for each legislator. Legislators with a proportion of missing votes greater than this value are removed.

  • 'lop_issue' (default = 0): A threshold for the proportion of non-missing votes on the minority side. Voting issues with a minority proportion lower than this value are excluded.

Value

A roll call object that has been processed.

Examples

data(h116)
h116.c = preprocess_rollcall(h116)

[Package pumBayes version 1.0.0 Index]