distance               package:MatchIt               R Documentation

_D_i_s_t_a_n_c_e _f_u_n_c_t_i_o_n: _e_s_t_i_m_a_t_i_n_g _p_r_o_p_e_n_s_i_t_y _s_c_o_r_e_s

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

     The distance function calculates the distance measure to be used
     in the matching, usually the propensity score. It is a
     sub-function of 'matchit'.

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

     distance <- distance(formula, model="logit", data, discard=0, reestimate=FALSE, counter=TRUE, ...)

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

 formula: (required).  Takes the form of 'T ~ X1 + X2', where 'T' is a
          binary treatment indicator and 'X1' and 'X2' are the
          pre-treatment covariates, and 'T', 'X1', and 'X2' are
          contained in the same data frame.  The '+' symbol means
          "inclusion" not "addition." You may also include interaction
          terms in the form if 'I(X1*X2)' or squared terms in the form
          of 'I(X1^2)'.

    data: (required).  Data frame containing the variables called in
          the 'formula'.   The dataframe should not include variables
          with the names 'psclass', 'psweights', or 'pscore', as these
          are expressly reserved in the output dataframe for MatchIt.

   model: Method used to estimate the propensity score.  May be "logit"
          (default), "probit", "nnet", "GAM", or "cart".

 discard: Whether to discard units that fall outside some measure of
          support of the distance score.  0 (default)=keep all units. 
          1=keep all units with common support.  2=discard only control
          units outside the support of the distance measure of the
          treated units.  3=discard only treated units outside the
          support of the distance measure of the control units.

reestimate: Specifies whether to reestimate the propensity score model
          after discarding units (default=FALSE).

 counter: Whether to display counter indicating the progress of the
          matching (default=TRUE).

     ...: Additional arguments to be passed to 'distance', depending on
          the model to be used.

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

     This is a sub-function of the 'matchit' command, which calculates
     the distance measure used in the matching, usually the propensity
     score.  This function is called directly by 'matchit' and does not
     generally need to be called directly by users; these details are
     included for advanced users.

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

in.sample: Vector of length n showing whether each unit was eligible
          for matching due to common support restrictions with
          'discard'.

  pscore: Vector of estimated propensity scores.

   treat: The treatment indicator from 'data'.

covariates: Covariates used in the right-hand side of the assignment
          model.

assign.model: Output of the assignment model.

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

     Daniel Ho <deho@fas.harvard.edu>;  Kosuke Imai
     <kimai@princeton.edu>; Gary King <king@harvard.edu>; Elizabeth
     Stuart<stuart@stat.harvard.edu>

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

     Please use 'help.matchit' to access the matchit reference manual. 
     The complete document is available online at <URL:
     http://gking.harvard.edu/matchit>.

