extremevalue: Maximum likelihood for GEV and generalized Pareto

Description Usage Arguments Value Examples

Description

Maximum likelihood for generaluzed extreme value and generalized Pareto, using modified Newton-Raphson

Usage

1
2
3
4
5
6
7
8
9
gevmle(xdata, maxitn=20)
gpmle(xdata ,maxitn=20)
dgev(x, xi=1,mu=0,sigma=1) 
pgev(x, xi=1,mu=0,sigma=1)
qgev(p, xi=1,mu=0,sigma=1)
logdgev(x, xi=1,mu=0,sigma=1)
dgpareto(x,xi, sigma=1)
pgpareto(x,xi, sigma=1)
qgpareto(p,xi, sigma=1)

Arguments

xdata

data set, should be positive-valued exceedances for gpmle

maxitn

maximum number of iterations for Newton-Raphson method

x

scalar of vector

p

scalar of vector, values in 0 to 1

xi

tail index or shape parameter of GEV

mu

location parameter

sigma

scale parameter

Value

list with $loglik, $params, $covar for gevmle and gpmle functions

density, cdf, quantile or log density values with the other functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
set.seed(123)
x=rnorm(2000)
xmat=matrix(x,40,50)
mxdat=apply(xmat,1,max)
gevmle(mxdat) # xi is negative because of sub-asymptotics
gpmle(x[x>1.3]-1.3)
rpareto=function(n,alp,s)
{ u=runif(n); tem=u^(-1/alp)-1; return(s*tem) }
set.seed(123)
x=rpareto(2000,alp=3,s=1)
xmat=matrix(x,40,50)
mxdat=apply(xmat,1,max)
gevmle(mxdat) # xi close to 1/alp=1/3
gpmle(x[x>1.2]-1.2)

YafeiXu/CopulaModel documentation built on May 9, 2019, 11:07 p.m.