pparetoCP {extremefit}R Documentation

Pareto change point distribution

Description

Distribution function, quantile function and random generation for the Pareto change point distribution with a0a0 equal to the shape of the first pareto distribution, a1a1 equal to the shape of the second pareto distribution, x0x0 equal to the scale and x1x1 equal to the change point.

Usage

pparetoCP(x, a0 = 1, a1 = 2, x0 = 1, x1 = 6)

qparetoCP(p, a0 = 1, a1 = 2, x0 = 1, x1 = 6)

rparetoCP(n, a0 = 1, a1 = 2, x0 = 1, x1 = 6)

Arguments

x

a vector of quantiles.

a0

a vector of shape parameter of the Pareto distribution before x1x1.

a1

a vector of shape parameter of the Pareto distribution after x1x1.

x0

a vector of scale parameter of the function.

x1

a vector of change point value.

p

a vector of probabilities.

n

a number of observations. If length(n) > 1, the length is taken to be the number required.

Details

If not specified, a0,a1,x0a0, a1, x0 and x1x1 are taking respectively the values 1,2,11, 2, 1 and 66

The cumulative Pareto change point distribution is given by :

F(x)=(x<=x1)(1xa0)+(x>x1)(1xa1x1a0+a1) F(x) = (x <= x1)* (1 - x^{-a0}) + (x > x1) * ( 1 - x^{-a1} * x1^{-a0 + a1})

Value

pparetoCP gives the distribution function, qparetoCP gives the quantile function, and rparetoCP generates random deviates.

The length of the result is determined by n for rparetoCP, and is the maximum of the lengths of the numerical arguments for the other functions.

The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.

Examples

par(mfrow = c(2,1))

plot(function(x) pparetoCP(x), 0, 5,ylab="distribution function",
     main = " Pareto change point Cumulative ")
mtext("pparetoCP(x)", adj = 0)

plot(function(x) qparetoCP(x), 0, 1,ylab="quantiles",
     main = " Pareto change point Quantile")
mtext("qparetoCP(x)", adj = 0)

#generate a sample of pareto distribution of size n
n <- 100
x <- rparetoCP(n)


[Package extremefit version 1.0.2 Index]