normmix | R Documentation |
The number of components in the mixed normal distribution is specified by the length of the parameter vectors. The quantiles are numerically obtained from the distribution function using monotone cubic splines.
rnormmix(n, mu, sigma, prop) dnormmix(x, mu, sigma, prop) pnormmix(q, mu, sigma, prop) qnormmix(p, mu, sigma, prop)
n |
integer value, the number of random samples to be
generated with |
mu |
numeric vector holding the means of the components. |
sigma |
numeric vector holding the standard deviations of the components. |
prop |
numeric vector, holding the mixing proportions of the components. |
x |
numeric vector giving the points where the density function is evaluated. |
q |
numeric vector giving the quantiles where the distribution function is evaluated. |
p |
numeric vector giving the probabilities where the quantile function is evaluated. |
dnormmix()
gives a vector of length length(x)
containing the density at x
.
pnormmix()
gives a
vector of length length(q)
containing
the distribution function at the corresponding values of q
.
qnormmix()
gives a vector of length length(p)
containing the quantiles at the corresponding values of p
.
rnormmix()
generates a vector of length n
containing the random samples.
rnormmix(10, mu = c(0, 3, 7), sigma = c(2, 2, 4), prop = c(0.6, 0.3, 0.1)) dnormmix(c(0, 2, 1), mu = c(0, 3), sigma = c(2, 2), prop = c(0.6, 0.4)) prob <- pnormmix(c(0.1, 7), mu = c(0, 3, 7), sigma = c(2, 2, 4), prop = c(0.6, 0.3, 0.1)) prob qnormmix(prob, mu = c(0, 3, 7), sigma = c(2, 2, 4), prop = c(0.6, 0.3, 0.1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.