Function Reference: gpfit

statistics: paramhat = gpfit (x)
statistics: [paramhat, paramci] = gpfit (x)
statistics: […] = gpfit (x, alpha)
statistics: […] = gpfit (x, alpha, options)

Parameter estimates and confidence intervals for generalized Pareto data.

paramhat = gpfit (x) returns maximum likelihood estimates of the parameters of the two-parameter generalized Pareto distribution given the data in x. params(1) is the SHAPE parameter and params(2) is the SCALE parameter. gpfit does not fit a LOCATION parameter.

[paramhat, paramci] = gpfit (x) returns 95% confidence intervals for the parameter estimates.

[…] = gpfit (x, alpha) returns 100*(1 - alpha) percent confidence intervals for the parameter estimates.

Pass in [] for alpha to use the default values.

[…] = gpfit (x, alpha, options) specifies control parameters for the iterative algorithm used to compute ML estimates with the fminsearch function. options is a structure with the following fields {default values}:

  • ’Display’ {"off"}
  • ’MaxFunEvals’ {400}
  • ’MaxIter’ {200}
  • ’TolBnd’ {1.0e-6}
  • ’TolFun’ {1.0e-6}
  • ’TolX’ {1.0e-6}

Other functions for the generalized Pareto, such as gpcdf, allow a LOCATION parameter. However, gpfit does not estimate LOCATION, and it must be assumed known, and subtracted from x before calling gpfit.

When shape = 0 and location = 0, the generalized Pareto distribution is equivalent to the exponential distribution. When shape > 0 and location = scale / shape, the generalized Pareto distribution is equivalent to the Pareto distribution. The mean of the generalized Pareto distribution is not finite when shape >= 1, and the variance is not finite when shape >= 1/2. When shape >= 0, the generalized Pareto distribution has positive density for x > location, or, when shape < 0, for 0 <= (x - location) / scale <= -1 / shape.

See also: gpcdf, gpinv, gppdf, gprnd, gplike, gpstat

Source Code: gpfit