View source: R/GaussianMixturePdf.R
GaussianMixturePdf | R Documentation |
This function computes the density function of a mixture of Gaussian univariate distributions
GaussianMixturePdf(x, mu, sigma, w)
x |
Points at which the density is comptuted (n x 1); |
mu |
vector of means for each regime (r x 1); |
sigma |
vector of standard deviations for each regime (r x 1); |
w |
vector of the probability of each regime (r x 1). |
f |
Values of the distribution function |
Bouchra R Nasri and Bruno N RĂ©millard, January 31, 2019
mu <- c(-0.3 ,0.7) ; sigma <- c(0.15,0.05); w <-c(0.8, 0.2);
x <- seq(-1, 1, by = 0.01)
f <- GaussianMixturePdf(x,mu,sigma,w)
plot(x,f,type="l")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.