do.get.quantiles: Internal function for subclasses to get quantiles for the...

do.get.quantilesR Documentation

Internal function for subclasses to get quantiles for the variables in a distribution

Description

This function is provided to be overriden by developers. End users should instead call get.quantiles

Usage

do.get.quantiles(dist, p, lower.tail = T, log.p = F, n.sim = 1000)

Arguments

dist

An object of class Distribution or a subclass

p

A vector of probabilities for which to get the quantiles

lower.tail

If true, the returned values are the greatest values x for each variable such that P(X \leq x) \geq p. If fale, the returned values are the smallest values x for each variable such that P(X > x) \geq p. This can be either a scalar (in which case the value is applied to all quantiles), or a vector with one logical value for each value of p

n.sim

If the values are to be calculated by random sample generation, how many random samples to generate

Details

The default implementation takes random samples and pulls the sample quantiles from them. The wrapper get.quantiles takes care of formatting the return value and generating warnings for any improper variables

Value

If there is only one variable in the distribution, a vector of quantiles for each value of p. If p is length one, a vector of quantiles for each variable in the distribution. If there is more than one variable in the distribution and p>1, a matrix with one row for each value of p, where each column represents a variable in the distribution


tfojo1/distributions documentation built on July 27, 2024, 3:29 p.m.