Created
October 1, 2018 23:20
-
-
Save ericnovik/024820759e8d902b9cd7ab890103dd9a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(cowplot) | |
n <- 1e4 | |
X <- rlogis(n) | |
Y <- plogis(X) | |
plot_dens <- function(data, ...) { | |
qplot( | |
data, | |
geom = "histogram", | |
alpha = I(1 / 2), | |
... | |
) + xlab("") | |
} | |
pl <- plot_dens(X) + ggtitle("Logistic Distribution") | |
pu <- plot_dens(Y) + ggtitle("Uniform from Logistic") | |
plot_grid(pl, pu) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment