qnormmix: Quantile function of a mixture of two normal distributions.

View source: R/helper.R

qnormmixR Documentation

Quantile function of a mixture of two normal distributions.

Description

qnormmix returns the quantile corresponding to p or 1 - q on the mixture normal distribution.

Usage

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

Arguments

p

A vector of probabilities.

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 quantile corresponding to p or 1 - q on the mixture normal distribution.

Examples

## Not run: 
qnormmix(0.8, 0, 3.1, 1.7, 0.5, lower.tail = FALSE)

## End(Not run)

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