computeMargins             package:pscl             R Documentation

_a_d_d _i_n_f_o_r_m_a_t_i_o_n _a_b_o_u_t _v_o_t_i_n_g _o_u_t_c_o_m_e_s _t_o _a _r_o_l_l_c_a_l_l
_o_b_j_e_c_t

_D_e_s_c_r_i_p_t_i_o_n:

     Add summaries of each roll call vote to a 'rollcall' object.

_U_s_a_g_e:

     computeMargins(object, dropList = NULL)

_A_r_g_u_m_e_n_t_s:

  object: an object of class 'rollcall'

dropList: a 'list' (or 'alist') listing voting decisions, legislators
          and/or votes to be dropped from the analysis; see
          'dropRollCall' for details.

_D_e_t_a_i_l_s:

     The subseting implied by the 'dropList' is first applied to the
     'rollcall' object, via 'dropRollCall'. Then, for each remaining
     roll call vote, the number of legislators voting "Yea", "Nay", and
     not voting are computed, using the encoding information in the
     'codes' component of the 'rollcall' object via the 'convertCodes'
     function.  The matrix of vote counts are added to the 'rollcall'
     object as a component 'voteMargins'.

_V_a_l_u_e:

     An object of class 'rollcall', with a component 'voteMargins' that
     is a matrix with four columns:  

     Yea: number of legislators voting "Yea"

     Nay: number of legislators voting "Nay"

      NA: number of legislators not voting "Nay"

     Min: the number of legislators voting on the losing side of the
          roll call

_A_u_t_h_o_r(_s):

     Simon Jackman jackman@stanford.edu

_S_e_e _A_l_s_o:

     'dropRollCall' on specifying a 'dropList'. The vote-specific
     marginals produced by theis function are used by as
     'dropRollCall', 'summary.ideal' and 'predict.ideal'.

_E_x_a_m_p_l_e_s:

     data(s109)
     tmp <- computeMargins(s109)
     dim(tmp$voteMargins)   ## 556 by 4

     tmp <- computeMargins(s109,
                          dropList=list(codes="notInLegis",lop=0))
     dim(tmp$voteMargins)   ## 477 by 4

