| normal_approx | R Documentation |
Constructs a normal (or multivariate normal) distribution that matches the mean and variance-covariance of the input distribution. This is useful as a quick Gaussian approximation for any distribution whose first two moments are available.
normal_approx(x)
x |
A |
A normal distribution (for univariate inputs) or an
mvn distribution (for multivariate inputs) with the same
mean and variance-covariance as x.
# Approximate a Gamma(5, 2) with a normal
g <- gamma_dist(shape = 5, rate = 2)
n <- normal_approx(g)
mean(n)
vcov(n)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.