link                   package:aod                   R Documentation

_T_r_a_n_s_f_o_r_m_a_t_i_o_n _f_r_o_m _t_h_e _O_b_s_e_r_v_a_t_i_o_n _S_c_a_l_e _t_o _t_h_e _L_i_n_k _S_c_a_l_e

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

     The function transforms a variable from the observation scale
     (probability or count) to the link scale.

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

     link(x, type = c("cloglog", "log", "logit"))

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

       x: A vector of real numbers.

    type: A character string. Legal values are "cloglog", "log" and
          "logit".

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

     logit(x) = log(x / (1 - x))
      cloglog(x) = log(-log(1 - x ))

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

     'invlink'

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

       x <- seq(.001, .999, length = 100)
       plot(x, link(x, type = "logit"),
            type = "l", lwd = 2, ylab = "link(proba.)")
       lines(x, link(x, type = "cloglog"), lty = 2, lwd = 2)
       grid(col = "black")
       legend(0, 6, legend = c("logit(x)", "cloglog(x)"),
              lty = c(1, 2), bg = "white")
       

