pmnorm | R Documentation |
The Two Component Mixture Normal Distribution
pmnorm(q, mu, sigma, lambda, log = FALSE, verbose = FALSE) dmnorm(x, mu, sigma, lambda, log = FALSE, verbose = FALSE)
q, x |
(Vector). Values to calculate distributional values of. |
mu |
(Vector). A two value vector of mean values. |
sigma |
(Vector). A two value vector of component-wise variances |
lambda |
(Vector). A two value vector of component mixing coefficients |
log |
(Boolean). Whether returning probabilities are in log format |
verbose |
(Boolean). Whether to return component values. |
A numeric value representing the probability density value of a two-component mixture distribution
pmnorm
: Cumulative Distribution Function
dmnorm
: Probability Density Function
library(mixtools) lambda <- c(0.7,0.3) mu <- c(1,2) sigma <- c(1,1) v <- rnormmix(100, lambda=lambda, mu=mu, sigma=sigma) pmnorm(v, lambda=lambda,mu=mu,sigma=sigma) dmnorm(v, lambda=lambda,mu=mu,sigma=sigma)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.