rgp: Generalized Pareto random numbers

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/rgp.R

Description

This function generates pseudo random numbers from a generalized Pareto distribution (gPd).

Usage

1
rgp(n,shape,scale)

Arguments

n

sample size.

shape

shape parameter.

scale

scale parameter. Default scale=1.

Details

The distribution function of the gPd with shape and scale parameters gamma and sigma is

F(x) = 1 - [ 1 + gamma x / sigma ]^(-1/gamma)

where gamma is a real number, sigma > 0 and 1 + gamma x / sigma > 0. When gamma = 0, we have the exponential distribution with scale parameter sigma.

Value

A vector of length n.

Author(s)

Elizabeth Gonzalez Estrada, Jose A. Villasenor Alva

See Also

gpd.test for testing the gPd hypothesis

Examples

1
rgp(30,shape=1.5)    ## Generates 30 random numbers from a gPd with shape parameter 1.5.

gPdtest documentation built on May 29, 2017, 11:14 p.m.

Related to rgp in gPdtest...