pmnorm: The Two Component Mixture Normal Distribution

View source: R/utils.R

pmnormR Documentation

The Two Component Mixture Normal Distribution

Description

The Two Component Mixture Normal Distribution

Usage

pmnorm(q, mu, sigma, lambda, log = FALSE, verbose = FALSE)

dmnorm(x, mu, sigma, lambda, log = FALSE, verbose = FALSE)

Arguments

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.

Value

A numeric value representing the probability density value of a two-component mixture distribution

Functions

  • pmnorm: Cumulative Distribution Function

  • dmnorm: Probability Density Function

Examples

    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)

qpmnguyen/teaR documentation built on April 4, 2022, 7:26 p.m.