Generates random deviates of a piecewise Pareto distribution
rPiecewisePareto( n, t, alpha, truncation =NULL, truncation_type ="lp", scale_pieces =NULL)
Arguments
n: Numeric. Number of simulations
t: Numeric vector. Thresholds of the piecewise Pareto distribution.
alpha: Numeric vector. alpha[i] is the Pareto alpha in excess of t[i].
truncation: Numeric. If truncation is not NULL and truncation > t, then the distribution is truncated at truncation.
truncation_type: Character. If truncation_type = "wd" then the whole distribution is truncated. If truncation_type = "lp" then a truncated Pareto is used for the last piece.
scale_pieces: Numeric vector. If not NULL then the density of the i-th Pareto piece (on the interval (t[i], t[i+1])) is scaled with the factor const * scale_pieces[i] (where const is a normalization constant)
Returns
A vector of n samples from the (truncated) piecewise Pareto distribution with parameter vectors t and alpha