Convert a uniform distribution to a normal (gaussian) distribution with specified mu and sd
Arguments
- x
the uniformly distributed vector
- mu
the mean of the normal distribution to return
- sd
the SD of the normal distribution to return
- min
the minimum possible value of x (calculated from x if not given)
- max
the maximum possible value of x (calculated from x if not given)
Examples
x <- runif(10000)
y <- unif2norm(x)
#> min was set to -7.75516334921122e-05
#> max was set to 1.00008334655538
g <- ggplot2::ggplot() + ggplot2::geom_point(ggplot2::aes(x, y))
ggExtra::ggMarginal(g, type = "histogram")