Solved – Required: Method of moments fitting routine for the two-parameter generalized Pareto

extreme valuemethod of momentspareto-distribution

I am currently using the evd package which fits a two-parameter GPD by maximum likelihood.
Since in small samples the MOM is superior to the ML estimation I'd like to give it a go. However, the POT package – which could do the job – is offline due to memory access errors.

There are many extreme value packages around. However I am ONLY interested in the two-parameter GPD given by

$G(y)= \begin{cases} 1-\left(1+ \frac{\xi y}{\beta} \right)^{-\frac{1}{\xi}} & \xi \neq 0 \\
1-\exp\left(-\frac{y}{\beta}\right) & \xi=0 \end{cases}$

or alternatively

$g(y)= \begin{cases} \frac{1}{\beta} \left( 1+\frac{\xi y}{\beta} \right)^{-1-\frac{1}{\xi}} & \xi \neq 0 \\
\frac{1}{\beta} \exp\left(-\frac{y}{\beta} \right) & \xi=0
\end{cases}$

Is there any package that can fit such a distribution using a method of moments approach?

Best Answer

As the case when $\xi = 0$ simply corresponds to an exponential distribution with scale parameter $\beta$, it is trivial to compute the method of moments estimator given $\overline y$, the first sample raw moment (the second is not needed since there is only one parameter to estimate in this case). For the case $\xi < 1/2$ with $\xi \ne 0$, we can easily calculate $${\rm E}[Y] = \frac{\beta}{1-\xi}, \quad {\rm E}[Y^2] = \frac{2\beta^2}{(1-\xi)(1-2\xi)},$$ which shows that the first and second raw moments of $Y$ are defined only if $\xi < 1/2$. Consequently, setting these to their respective sample moments and solving for the parameters easily yields the closed form solution $$\widehat{\beta} = \frac{\overline y \overline{y^2}}{2(\overline{y^2} - (\overline y)^2)}, \quad \widehat{\xi} = \frac{1}{2} - \frac{(\overline y)^2}{2(\overline{y^2} - (\overline y)^2)},$$ where $\overline{y^2} = \frac{1}{n} \sum_{i=1}^n y_i^2$ is the second sample raw moment.

Related Question