logit                  package:car                  R Documentation

_L_o_g_i_t _T_r_a_n_s_f_o_r_m_a_t_i_o_n

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

     Compute the logit transformation of proportions or percentages.

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

     logit(p, percents=max(p, na.rm = TRUE) > 1, adjust)

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

       p: numeric vector or array of proportions or percentages.

percents: 'TRUE' for percentages.

  adjust: adjustment factor to avoid proportions of 0 or 1; defaults to
          '0' if there are no such proportions in the data, and to
          '.025' if there are.

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

     Computes the logit transformation logit = log[p/(1 - p)] for the
     proportion p. 

     If p = 0 or 1, then the logit is undefined. 'logit' can remap the
     proportions to the interval  '(adjust, 1 - adjust)' prior to the
     transformation. If it adjusts the data automatically, 'logit' will
     print a warning message.

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

     a numeric vector or array of the same shape and size as 'p'.

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

     John Fox jfox@mcmaster.ca

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

     'prob.axis'

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

     options(digits=4)
     logit(.1*0:10)
     ##  [1] -3.6636 -1.9924 -1.2950 -0.8001 -0.3847  0.0000  0.3847
     ##  [8]  0.8001  1.2950  1.9924  3.6636
     ## Warning message: 
     ## Proportions remapped to (0.025,0.975) in: logit(0.1 * 0:10) 

     logit(.1*0:10, adjust=0)
     ##  [1]    -Inf -2.1972 -1.3863 -0.8473 -0.4055  0.0000  0.4055
     ##  [8]  0.8473  1.3863  2.1972     Inf

