Last data update: 2014.03.03

R: 'maxlo' distribution
MaxloR Documentation

'maxlo' distribution

Description

Density function, distribution function, quantile function and random generation for the 'maxlo' distribution.

Usage

   dmaxlo(x, scale = 1.0, shape = 4.0, log = FALSE)
   pmaxlo(q, scale = 1.0, shape = 4.0, lower.tail = TRUE)
   qmaxlo(p, scale = 1.0, shape = 4.0)
   rmaxlo(n, scale = 1.0, shape = 4.0) 

Arguments

x, q

Vector of quantiles.

p

Vector of probabilities.

n

Number of observations.

scale, shape

Shift and shape parameters. Vectors of length > 1 are not accepted.

log

Logical; if TRUE, the log density is returned.

lower.tail

Logical; if TRUE (default), probabilities are Pr[X <= x], otherwise, Pr[X > x].

Details

The 'maxlo' distribution function with shape α>0 and scale β>0 is a special case of Generalised Pareto (GPD) with negative shape ξ < 0 and location at zero. This is the finite upper endpoint case of the GPD. Its name is nonstandard and was chosen to suggest some form of symmetry with respect to the Lomax distribution.

The survival function is

S(y) = [1 - y / β]^α (0 < y < β)

This distribution has a coefficient of variation smaller than 1.

Value

dmaxlo gives the density function, pmaxlo gives the distribution function, qmaxlo gives the quantile function, and rmaxlo generates random deviates.

Note

The 'maxlo' and GPD parameters are related according to

α = -1/ξ, β = -σ/ξ.

where σ is the scale parameter of the GPD. Since only GPD with ξ > -0.5 seem to be used in practice, this distribution should be used with α > 2.

This distribution can be used in POT to describe bounded excesses following GPD with shape ξ < 0. The scale parameter β then represents the upper end-point of the excesses, implying the finite upper end-point u + β for the levels, where u is the threshold. It can be used in Renouv with a fixed scale parameter, thus allowing a control of the upper end-point.

This distribution is simply a rescaled version of a beta distribution and also a rescaled version of a Kumaraswamy distribution. The name "maxlo" is used here to suggest a form of symmetry to Lomax distribution.

See Also

fmaxlo to fit such a distribution by Maximum Likelihood.

Examples

xs <- rmaxlo(500, shape = 2.2, scale = 1000)
hist(xs, main = "'maxlo' distribution"); rug(xs)

xs <- rmaxlo(500, shape = 4, scale = 1000)
hist(xs, main = "'maxlo' distribution"); rug(xs)

x <- seq(from = -10, to = 1010, by = 2)
plot(x = x, y = dmaxlo(x, shape = 4, scale = 1000),
     type = "l", ylab = "dens",
     col = "orangered", main = "dmaxlo and dgpd")
abline(h = 0)
lines(x = x, y = dgpd(x, shape = -1/4, scale = 250),
     type = "l",
     col = "SpringGreen3", lty = "dashed")



Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Renext)
Loading required package: evd
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Renext/Maxlo.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Maxlo
> ### Title: 'maxlo' distribution
> ### Aliases: Maxlo dmaxlo pmaxlo qmaxlo rmaxlo
> ### Keywords: distribution
> 
> ### ** Examples
> 
> xs <- rmaxlo(500, shape = 2.2, scale = 1000)
> hist(xs, main = "'maxlo' distribution"); rug(xs)
> 
> xs <- rmaxlo(500, shape = 4, scale = 1000)
> hist(xs, main = "'maxlo' distribution"); rug(xs)
> 
> x <- seq(from = -10, to = 1010, by = 2)
> plot(x = x, y = dmaxlo(x, shape = 4, scale = 1000),
+      type = "l", ylab = "dens",
+      col = "orangered", main = "dmaxlo and dgpd")
> abline(h = 0)
> lines(x = x, y = dgpd(x, shape = -1/4, scale = 250),
+      type = "l",
+      col = "SpringGreen3", lty = "dashed")
> 
> 
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>