qcat {sklarsomega}R Documentation

Compute the quantile function for a categorical distribution.

Description

Compute the quantile function for a categorical distribution.

Usage

qcat(pr, p, lower.tail = TRUE, log.pr = FALSE)

Arguments

pr

vector of probabilities.

p

vector of proabilities.

lower.tail

logical; if TRUE (default), probabilities are P(X \le x), otherwise, P(X > x).

log.pr

logical; if TRUE, probabilities pr are handled as log(pr).

Details

This function computes quantiles for the categorical distribution with support 1, \dots , K and probabilities p = (p_1, \dots , p_K)'.

Value

qcat returns a vector of quantiles.


[Package sklarsomega version 3.0-2 Index]