eta <- seq(-3, 3, by = 0.1) # this is eta = log(mu(b, a)).
shape <- exp(1) # 'shape' argument.
## E1. Get 'scale' values with A WARNING (not the same length)!
theta <- weibullMlink(theta = eta, shape = shape, inverse = TRUE) # Scale
if (FALSE) {
## E2. Plot theta vs. eta, 'shape' fixed.
plot(theta, eta, type = "l", ylab = "", col = "blue",
main = paste0("weibullMlink(theta; shape = ",
round(shape, 3), ")"))
abline(h = -3:3, v = 0, col = "gray", lty = "dashed")
}
## E3. weibullMlink() and its inverse ##
etabis <- weibullMlink(theta = theta, shape = shape, inverse = FALSE)
summary(eta - etabis) # Should be 0
Run the code above in your browser using DataLab