EPDfit: Fit the Extended Pareto distribution to a vector of...

Description Usage Arguments Value Source Examples

View source: R/hello.R View source: R/code_package_v4_juin_2019.R View source: R/code_package_v3_juin_2019.R View source: R/code_package.r View source: R/code_package.R

Description

Fit the Extended Pareto distribution to a vector of observations, with weights, using maximum likelihood estimation

Usage

1
2
3
4
5
6
7
EPDfit(
  data,
  tau,
  start = c(0.1, 1),
  warnings = FALSE,
  weights = rep(1, length(data))
)

Arguments

data

vector of observations

tau

the value for tau in the EPD distribution

start

vector of length 2 containing the starting values for the optimisation (default are c(.1,1)

warnings

logical indicating if possible warnings from the optimisation function are shown

weight

vector of (positive) weights

rho

parameter of Fraga Alves et al. (2003) estimate

Value

a list with gamma the vector of the corresponding estimates for the tail parameter of the EPD, kappa the vector of the corresponding MLE estimates for the kappa parameter of the EPD, as well as tau

Source

adapted from https://github.com/TReynkens/ReIns/blob/master/R/EPD.R Tom Reynkens, ReIns package version 1.0.7

Examples

1
2
3
4
set.seed(123)
x <- rpareto1(100, mu=1, alpha=.5)
w <- rgamma(100,10,10)
EPDfit(data=x, tau=-3.3, weights=w)

freakonometrics/TopIncome documentation built on Oct. 16, 2021, 5:58 p.m.