norm2beta: Convert normal to beta

Description Usage Arguments Value Examples

View source: R/distribution_convertors.R

Description

Convert normal to beta

Usage

1
norm2beta(x, shape1, shape2, mu = mean(x), sd = stats::sd(x), ...)

Arguments

x

the normally distributed vector

shape1, shape2

non-negative parameters of the distribution to return

mu

the mean of x (calculated from x if not given)

sd

the SD of x (calculated from x if not given)

...

further arguments to pass to qbeta (e.g., ncp)

Value

a vector with a beta distribution

Examples

1
2
3
4
x <- rnorm(10000)
y <- norm2beta(x, 1, 3)
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.