gamma2norm: Convert gamma to normal

Description Usage Arguments Value Examples

View source: R/distribution_convertors.R

Description

Convert gamma to normal

Usage

1
gamma2norm(x, mu = 0, sd = 1, shape = NULL, rate = 1, scale = 1/rate)

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)

Value

a vector with a normal distribution

Examples

1
2
3
4
x <- rgamma(10000, 2)
y <- gamma2norm(x)
g <- ggplot2::ggplot() + ggplot2::geom_point(ggplot2::aes(x, y))
ggExtra::ggMarginal(g, type = "histogram")

faux documentation built on Sept. 14, 2021, 1:08 a.m.