R/rgp.R

Defines functions rgp

Documented in rgp

# This function generates Generalized Pareto random numbers
rgp <- function(n,shape,scale=1)
{
	if(shape!=0)
		return((scale/shape)*(runif(n)**(-shape)-1))
	else return(rexp(n,scale))
}

Try the gPdtest package in your browser

Any scripts or data that you put into this service are public.

gPdtest documentation built on May 2, 2019, 8:57 a.m.