On entry: the observations
, for , assumed to follow a generalized Pareto distribution.
Constraints:
;
.
3:
optopt – Nag_OptimOptInput
On entry: determines the method of estimation, set:
For the method of probability-weighted moments.
For the method of moments.
For maximum likelihood with starting values given by the method of moments estimates.
For maximum likelihood with starting values given by the method of probability-weighted moments.
Constraint:
, , or .
4:
xi – double *Output
On exit: the parameter estimate .
5:
beta – double *Output
On exit: the parameter estimate .
6:
asvc[] – doubleOutput
On exit: the variance-covariance of the asymptotic Normal distribution of and . contains the variance of ; contains the variance of ; and contain the covariance of and .
7:
obsvc[] – doubleOutput
On exit: if maximum likelihood estimates are requested, the observed variance-covariance of and . contains the variance of ; contains the variance of ; and contain the covariance of and .
8:
ll – double *Output
On exit: if maximum likelihood estimates are requested, ll contains the log-likelihood value at the end of the optimization; otherwise ll is set to .
9:
fail – NagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).
6 Error Indicators and Warnings
NE_ALLOC_FAIL
Dynamic memory allocation failed.
NE_BAD_PARAM
On entry, argument had an illegal value.
NE_INT
On entry, .
Constraint: .
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
NE_OPTIMIZE
The maximum likelihood optimization failed; try a different starting point by selecting the other maximum likelihood estimation option in argument optopt.
Variance of data in y is too low for method of moments optimization.
The distribution of maximum likelihood estimates cannot be calculated and the asymptotic distribution is not available for the returned parameter estimates.
NW_PARAM_DIST_ASYM
The asymptotic distribution is not available for the returned parameter estimates.
NW_PARAM_DIST_OBS
The distribution of maximum likelihood estimates cannot be calculated for the returned parameter estimates because the Hessian matrix could not be inverted.
7 Accuracy
Not applicable.
8 Parallelism and Performance
nag_estim_gen_pareto (g07bfc) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the Users' Note for your implementation for any additional implementation-specific information.
9 Further Comments
The search for maximum likelihood parameter estimates is further restricted by requiring
as this avoids the possibility of making the log-likelihood arbitrarily high.
10 Example
This example calculates parameter estimates for observations assumed to be drawn from a generalized Pareto distribution.