rakeadj                 package:rake                 R Documentation

_A_d_j_u_s_t _t_h_e _m_a_r_g_i_n_a_l _t_o_t_a_l _w_e_i_g_h_t_s _o_f _a "_r_a_k_e" _c_l_a_s_s _o_b_j_e_c_t

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

     The marginal total weights of the rake object are adjusted to
     match the population marginal total weights specified by 'marg'.
     As a result, the total weights of each class of 'rake' will be
     adjusted, and these adjusted weights can be used for estimation.

     This is the second function in the 'rake', 'rakeadj',
     'predict.rake' Rake analysis series.

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

     rakeadj(rake, marg, verbose)

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

    rake: Object of class "rake" created with 'rake'.

    marg: The population marginal total weights. This may be specified
          in any of the following ways:

          numeric: vector of marginal total weights, matched to the
          values in 'rake' by name.

          data.frame: column "weight" must contain the weights, matched
          by names specified in column "name".

          character: filename of an appropriate table that will be read
          as a 'data.frame'.

 verbose: logical: Should the number of iterations for the rake
          adjustment to converge be printed?

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

     Rake adjustment via 'rakeadj' is accomplished by, for each class,
     dividing by the marginal total weights of the class, then
     multiplying by the marginal total weight specified by 'marg'.

     After performing the rake adjustment above on each class in the
     rows of 'rake', the marginal totals of the rows of 'rake' match
     the target marginal totals specified by 'marg', but the marginal
     totals of the columns of 'rake' do not match the target marginal
     totals. So, the rake adjustment is then performed on each class of
     the columns of 'rake', which then syncs the column marginal totals
     but unsyncs the row marginal totals.

     By repeatedly performing the rake adjustment, the marginal totals
     of the columns and rows of 'rake' eventually converge to the
     marginal totals specified by 'marg'.

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

     Object of class "rake", with adjusted weights.

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

     Toby Dylan Hocking <tdhock@ocf.berkeley.edu>

_R_e_f_e_r_e_n_c_e_s:

     Sharon L. Lohr. Sampling: Design and Analysis, pp. 269-271.
     Brooks/Cole, Pacific Grove, CA, 1999.

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

     'rake' for creating the initial "rake" class object,
     'predict.rake' for making estimates with the adjusted weight
     values, 'simpleRake' for performing the entire Raking process.

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

     example(rake)
     r <- rakeadj( r, statpoptotal, TRUE )
     print(r)

