

logique(multiv)                              R Documentation

_L_o_g_i_c_a_l _C_o_d_i_n_g

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

     Simple logical coding of a vector: each value in the
     vector is replaced by a 1 (if it is above or equal to
     the median), by a 0 (if it is below the median).

_U_s_a_g_e_:

     logique(a)

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

       a: real-valued vector, with no missing values.

_V_a_l_u_e_:

     matrix of `length(a)' rows, and two columns.  The first
     column contains the logically coded values of `a', and
     the second column contains their complements.  Hence
     each row of this returned matrix necessarily sums to 1.

_B_A_C_K_G_R_O_U_N_D_:

     This form of coding is suitable for a subsequent corre-
     spondence analysis.  When all variable have been logi-
     cally (or fuzzily) coded, the row masses (proportional
     to the row sums) are identical.  Logical coding results
     in the input being in complete disjunctive form.

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

     J.-P. Benzecri Correspondence Analysis Handbook Marcel
     Dekker, Basel, 1992.

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

     `flou', `ca', `supplr', `supplc'.

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

     # Logical coding of input variables, `a', `b', `c':
     a.log <- logique(a)
     b.log <- logique(b)
     c.log <- logique(c)
     newdata <- cbind(a.log, b.log, c.log)
     ca.newdata <- ca(newdata)

