# Plot the density
x <- seq(0, 10, l = 128)
plot(x, dLSW(x, mu = 3), type = "l", col = "black")
lines(x, dLSW(x, mu = 5), type = "l", col = "red")
lines(x, dLSW(x, mu = 7), type = "l", col = "blue")
legend(x = 0, y = max(dLSW(x, mu = 3)), lty = 1, col = c("black", "red", "blue"),
legend = paste("mu =", c(3, 5, 7)))
Run the code above in your browser using DataLab