fittail: TailW Maximum Likelihood Estimation

Description Usage Arguments Value Examples

View source: R/fittail.R

Description

Maximum Likelihood Estimation of the tails by fitting a tailW or a FTG.

Usage

1
fittail(sample, dist = "TailW")

Arguments

sample

Sample data.

dist

Name of the distribution to fit.

Value

Gives a list of the estimated parameters fo the function fitted. For the TailW it returns, scale and shape. Fot the FTG it returns the parameters scale, shape, and threshold.

Examples

1
2
3
4
5
6
7
8
9
scale <- 2
shape <- 1
threshold <- 1
s <- rtailw(1000, threshold = threshold , scale = scale, shape = shape)
fits <- fittail(s, dist = "TailW")
x_seq <- seq(threshold, max(s), length.out = 500)
theo_density <- dtailw(x_seq, threshold = threshold, scale = fits$scale, shape = fits$shape)
hist(s, probability = TRUE, breaks = "FD")
lines(x = x_seq, y = theo_density, col = "red")

SergiVilardell/distributionTails documentation built on Jan. 17, 2021, 8:44 a.m.