rglmbayesianbernoulli-probability

Using graphs, how can I show that the logistic function is just an inverse logit function in R?


To plot my logistic function, I used:

plot(plogis, from = -10, to = 10) My x values were: -10 to 10

So, based off of that graph's output, what should I do next?

Edit: If I plot the logistic function, y = logistic(x) = 1/(1+exp(−x)), how do I go about plotting the logit function, y = log(x/(1−x)), using the output from the logistic function's y values?


Solution

  • This is too long for a comment.

    x = seq(-10,10, 0.2)
    y = 1/(1+exp(−x))
    plot(x,y, type="l")
    plot(y,x, type="l")