I have a set of values to which I want to fit a Generalized Pareto Distribution. Scipy provides functions for doing so: https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.stats.genpareto.html

However, the genpareto fit method requires 'c', the shape parameter for the GPD. How do I determine the value of c?

  • $\begingroup$ I couldn't find any documentation of the fitting procedure in your reference. Could you tell us what procedure you are using? I found one called fit, but it appears to estimate c. $\endgroup$ – whuber Feb 13 at 21:41
  • $\begingroup$ @whuber I am using the fit method, but there is no documentation available for the same. It does require me to pass a parameter c which is the shape parameter for the GPD. $\endgroup$ – Pranav Budhwant Feb 14 at 8:55

In Mathematica this works:

GPD = ParetoPickandsDistribution[2, 3, .07];
data = RandomVariate[GPD, 10^4];
FindDistributionParameters[data, ParetoPickandsDistribution[mu, sigma, eta]] ->
{mu -> 2.00036, sigma -> 2.96883, eta -> 0.07022}

where mu is the location parameter, sigma the scale parameter, and eta the shape parameter.

FindDistributionParameters can use 5 different methods (see the documentation), but I believe the default is maximum likelihood estimation (MLE). Mathematica has all the tools (Likelihood, LogLikelihood, FindMaximium, Maximize, and ParetoPickandsDistribution for the PDF) to do MLE from scratch, if that's your wont. There is a good explanation of MLE in Wikipedia.

| cite | improve this answer | |
  • $\begingroup$ Thank you, that is exactly what I wanted - I need to find the distribution parameters. Is there a way to access these Mathematica functions from python? $\endgroup$ – Pranav Budhwant Feb 14 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.