lambda.MD               package:eiPack               R Documentation

_C_a_l_c_u_l_a_t_e _s_h_a_r_e_s _u_s_i_n_g _d_a_t_a _f_r_o_m _M_D _m_o_d_e_l

_D_e_s_c_r_i_p_t_i_o_n:

     Calculates the population share of row members in a particular
     column as a proportion of the total number of row members in the
     selected subset of columns.

_U_s_a_g_e:

     lambda.MD(object, columns, ret.mcmc = TRUE)

_A_r_g_u_m_e_n_t_s:

  object: an R object of class 'eiMD', output from 'ei.MD.bayes'

 columns: a character vector of column names to be included in
          calculating the shares

ret.mcmc: a logical value indicating how the samples from the posterior
           should be returned.  If 'TRUE' (default), samples are
          returned as 'mcmc'  objects.  If 'FALSE', samples are
          returned as arrays. 

_D_e_t_a_i_l_s:

     This function allows users to define subpopulations within the
     data and calculate the proportion of individuals within each of
     the columns that defines that subpopulation.  For example, if the
     model includes the groups Democrat, Republican, and Unaffiliated,
     the argument 'columns = c(``Democrat", ``Republican")' will
     calculate the two-party shares of Democrats and Republicans for
     each row.

_V_a_l_u_e:

     Returns either a ((R * included columns) x samples) matrix as an
     'mcmc' object or a (R x included columns x samples) array.

_A_u_t_h_o_r(_s):

     Michael Kellermann <kellerm@post.harvard.edu> and Olivia Lau 
     <olivia.lau@post.harvard.edu>

_S_e_e _A_l_s_o:

     'ei.MD.bayes'

