Trying to plot "logit, probit, and cloglog"

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Trying to plot "logit, probit, and cloglog"


I am new here. Just trying to finish up a tutorial for my R class, and super stuck on a line of code.

I have to make a plot identical to this:

And here is the code that I have so far:

plot(logit(p), type = "l",
     xlab="η(X)", xlim=c(-4,4), ylab = "µ(X)", ylim=c(0.0,1.0))
legend("topleft", inset=.03,
       c("—   logit","- - - probit","∙ - ∙ cloglog"), horiz=FALSE)

which ends up plotting this:

I basically have everything that I need, I just don't know how to plot the lines.

Thank you anybody for any help.