Convert gamma to normal
Arguments
- x
the gamma distributed vector
- mu
the mean of the normal distribution to convert to
- sd
the SD of the normal distribution to convert to
- shape
gamma distribution parameter (must be positive)
- rate
an alternative way to specify the scale
- scale
gamma distribution parameter (must be positive)
Examples
x <- rgamma(10000, 2)
y <- gamma2norm(x)
#> shape was set to 2.0124650703357
g <- ggplot2::ggplot() + ggplot2::geom_point(ggplot2::aes(x, y))
ggExtra::ggMarginal(g, type = "histogram")