powered by
Convert normal to beta
norm2beta(x, shape1, shape2, mu = mean(x), sd = stats::sd(x), ...)
a vector with a beta distribution
the normally distributed vector
non-negative parameters of the distribution to return
the mean of x (calculated from x if not given)
the SD of x (calculated from x if not given)
further arguments to pass to qbeta (e.g., ncp)
x <- rnorm(10000) y <- norm2beta(x, 1, 3) g <- ggplot2::ggplot() + ggplot2::geom_point(ggplot2::aes(x, y)) ggExtra::ggMarginal(g, type = "histogram")
Run the code above in your browser using DataLab