SPSbalan                package:USPS                R Documentation

_T_e_s_t _f_o_r _W_i_t_h_i_n-_B_i_n _X-_c_o_v_a_r_i_a_t_e _B_a_l_a_n_c_e _i_n _S_u_p_e_r_v_i_s_e_d _P_r_o_p_e_n_s_i_y _S_c_o_r_i_n_g

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

     Test for Conditional Independence of X-covariate Distributions
     from Treatment Selection within Given, Adjacent PS Bins.

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

       xcvobj <- SPSbalan(dframe, trtm, qbin, xvar, faclev=3)

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

  dframe: Name of augmented data.frame written to the appn="" argument
          of SPSlogit().

    trtm: Name of the two-level treatment factor variable.

    qbin: Name of variable containing bin numbers.

    xvar: Name of one baseline covariate X variable used in the
          SPSlogit() PS model.

  faclev: Maximum number of different numerical values an X-covariate
          can assume without automatically being converted into a
          "factor" variable; faclev=1 causes a binary indicator to be
          treated as a continuous variable determining a proportion.

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

     The second step in Supervised Propensity Scoring analyses is to
     verify that baseline X-covariates have the same distribution,
     regardless of treatment, within each fitted PS bin.

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

     An output list object of class SPSbalan.

     "contin"uous xvar => only the following four outputs... 

 aovdiff: ANOVA output for marginal test.

   form2: Formula for differences in X due to bins and to treatment
          nested within bins.

 bindiff: ANOVA output for the nested within bin model.

     df3: Output data.frame containing 3 variables: X-covariate,
          treatment and bin.

  factab: Marginal table of counts by X-factor level and treatment.

     tab: Three-way table of counts by X-factor level, treatment and
          bin.

  cumchi: Cumulative Chi-Square statistic for interaction in the
          three-way, nested table.

   cumdf: Degrees of-Freedom for the Cumulative Chi-Squared.

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

     Bob Obenchain <sunsetstats@earthlink.net>

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

     Cochran WG. (1968) The effectiveness of adjustment by
     subclassification in removing bias in observational studies.
     _Biometrics_ *24*: 205-213.

     Obenchain RL. (2005) *USPSinR.pdf*  ../R_HOME/library/USPS  40
     pages.

     Rosenbaum PR, Rubin RB. (1983) The Central Role of the Propensity
     Score in Observational Studies for Causal Effects. _Biometrika_
     *70*: 41-55.

     Rosenbaum PR, Rubin DB. (1984) Reducing Bias in Observational
     Studies Using Subclassification on a Propensity Score. _J Amer
     Stat Assoc_ *79*: 516-524.

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

     'SPSlogit', 'SPSnbins' and 'SPSoutco'.

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

       data(lindner)
       PStreat <- abcix~stent+height+female+diabetic+acutemi+ejecfrac+ves1proc
       logtSPS <- SPSlogit(lindner, PStreat, PSfit, PSrnk, PSbin, appn="lindSPS")

       SPSbalvs <- SPSbalan(lindSPS, abcix, PSbin, ves1proc)
       SPSbalvs
       plot(SPSbalvs)

