phi                  package:psych                  R Documentation

_F_i_n_d _t_h_e _p_h_i _c_o_e_f_f_i_c_i_e_n_t _o_f _c_o_r_r_e_l_a_t_i_o_n _b_e_t_w_e_e_n _t_w_o _d_i_c_h_o_t_o_m_o_u_s _v_a_r_i_a_b_l_e_s

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

     Given a 1 x 4 vector or a 2 x 2 matrix of frequencies, find the
     phi coefficient of correlation.  Typical use is in the case of
     predicting a dichotomous criterion from a dichotomous predictor.

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

     phi(t, digits = 2)

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

       t: a 1 x 4 vector or a 2 x 2 matrix 

  digits: round the result to digits 

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

     In many prediction situations, a dichotomous predictor
     (accept/reject) is validated against a dichotomous criterion
     (success/failure).  Although a polychoric correlation estimates
     the underlying Pearson correlation as if the predictor and
     criteria were continuous and bivariate normal variables, the phi
     coefficient is the Pearson applied to a matrix of 0's and 1s.  

     The calculation follows J. Wiggins discussion of personality
     assessment.

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

     phi coefficient of correlation

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

     William Revelle with modifications by Leo Gurtler

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

     'phi2poly'

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

     phi(c(30,20,20,30))
     phi(c(40,10,10,40))
     x <- matrix(c(40,5,20,20),ncol=2)
     phi(x)

