### Example 1 ###
my.probs <- ppoints(100)
geol.inv <-
geometricffMlink(theta = geometricffMlink(theta = my.probs), # the inverse
inverse = TRUE) - my.probs
summary(geol.inv) ## zero
### Example 2. Special values of 'prob' ###
my.probs <- c(-Inf, -2, -1, 0, 0.25, 0.75, 1.0, 5, Inf, NaN, NA)
rbind(probs = my.probs,
geoffMlink = geometricffMlink(theta = my.probs),
inv.geoffl = geometricffMlink(theta = my.probs, inverse = TRUE))
### Example 3 Some probability link functions ###
# \donttest{
my.probs <- ppoints(100)
par(lwd = 2)
plot(my.probs, logitlink(my.probs), xlim = c(-0.1, 1.1), ylim = c(-5, 8),
type = "l", col = "limegreen",
ylab = "transformation", las = 1, main = "Some probability link functions")
lines(my.probs, geometricffMlink(my.probs), col = "gray50")
lines(my.probs, logffMlink(my.probs), col = "blue")
lines(my.probs, probitlink(my.probs), col = "purple")
lines(my.probs, clogloglink(my.probs), col = "chocolate")
lines(my.probs, cauchitlink(my.probs), col = "tan")
abline(v = c(0.5, 1), lty = "dashed")
abline(v = 0, h = 0, lty = "dashed")
legend(0.1, 8,
c("geometricffMlink", "logffMlink","logitlink", "probitlink",
"clogloglink", "cauchitlink"),
col = c("gray50", "blue", "limegreen", "purple", "chocolate", "tan"),
lwd = 1, cex = 0.5)
par(lwd = 1)
# }
Run the code above in your browser using DataLab