dnorm_mix | R Documentation |
Returns the value of a mixture Gaussian at given point x
dnorm_mix(x, n_comp, weights, means, sds)
x |
real value |
n_comp |
integer number of components of mixture Gaussian |
weights |
vector: weights of mixture Gaussian |
means |
vector: means of mixture Gassuan |
sds |
vector: st.devs of mixture Gaussian |
value: value of a mixture Gaussian at given point x
weights <- c(0.4, 0.6) means <- c(-3, 6) sds <- c(1 ,2) curve(dnorm_mix(x, n_comp = n_comp, weights = weights, means = means, sds = sds), -10, 15, ylim = c(0, 0.2), ylab = 'pdf')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.