pnormmix: Distribution function (pdf) of a mixture of two normal...

View source: R/helper.R

pnormmixR Documentation

Distribution function (pdf) of a mixture of two normal distributions.

Description

pnormmix returns the cumulative probability of q or 1 - q on the mixture normal distribution.

Usage

pnormmix(
  q,
  mean1 = 0,
  sd1 = 1,
  mean2 = 0,
  sd2 = 1,
  pmix1 = 0.5,
  lower.tail = TRUE
)

Arguments

q

A vector of quantiles.

mean1

Mean of the first normal distribution.

sd1

Standard deviation of the first normal distribution.

mean2

Mean of the second normal distribution.

sd2

Standard deviation of the second normal distribution.

pmix1

Mixing proportion for the first distribution. Should be a number in the range (0, 1).

lower.tail

A logical scalar; if TRUE (default), probabilities are P[X <= x]; otherwise, P[X > x].

Value

The output will be the cumulative probability of q or 1 - q on the mixture normal distribution.

Examples

## Not run: 
pnormmix(1, 0, 3.1, 1.7, 3.1, lower.tail = FALSE)

## End(Not run)

claycantrell/PartInvShinyUI documentation built on March 29, 2022, 9:49 a.m.