Convert normal to gamma
Arguments
- x
the normally distributed vector
- shape
gamma distribution parameter (must be positive)
- rate
an alternative way to specify the scale
- scale
gamma distribution parameter (must be positive)
- mu
the mean of x (calculated from x if not given)
- sd
the SD of x (calculated from x if not given)
Examples
x <- rnorm(10000)
y <- norm2gamma(x, shape = 2)
g <- ggplot2::ggplot() + ggplot2::geom_point(ggplot2::aes(x, y))
ggExtra::ggMarginal(g, type = "histogram")