invlink                 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 _L_i_n_k _S_c_a_l_e _t_o _t_h_e _O_b_s_e_r_v_a_t_i_o_n _S_c_a_l_e

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

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

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

       invlink(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:

     anti-logit(x) = exp(x) / (1 + exp(x))
      anti-cloglog(x) = 1 - exp(-exp(x))

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

     'link'

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

       x <- seq(-5, 5, length = 100)
       plot(x, invlink(x, type = "logit"),
            type = "l", lwd = 2, ylab = "Probability")
       lines(x, invlink(x, type = "cloglog"), lty = 2, lwd = 2)
       grid(col = "black")
       legend(-5, 1, legend = c("alogit(x)", "acloglog(x)"),
              lty = c(1, 2), bg = "white")
       

