rPiecewisePareto: Simulation of the Piecewise Pareto Distribution

Description Usage Arguments Value Examples

View source: R/Functions.R

Description

Generates random deviates of a piecewise Pareto distribution

Usage

1
2
3
4
5
6
7
8
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)

Value

A vector of n samples from the (truncated) piecewise Pareto distribution with parameter vectors t and alpha

Examples

1
2
3
4
5
6
t <- c(1000, 2000, 3000)
alpha <- c(1, 1.5, 2)
rPiecewisePareto(100, t, alpha)
rPiecewisePareto(100, t, alpha, truncation = 5000)
rPiecewisePareto(100, t, alpha, truncation = 5000, truncation_type = "lp")
rPiecewisePareto(100, t, alpha, truncation = 5000, truncation_type = "wd")

Pareto documentation built on March 3, 2021, 5:07 p.m.