R: Score and likelihood ratio tests fit of equality of shape...
NC.diag
R Documentation
Score and likelihood ratio tests fit of equality of shape over multiple thresholds
Description
The function returns a P-value path for the score testand/or likelihood ratio
test for equality of the shape parameters over
multiple thresholds under the generalized Pareto model.
m-vector of thresholds (sorted from smallest to largest)
GP.fit
function used to optimize the generalized Pareto model.
do.LRT
boolean indicating whether to perform the likelihood ratio test (in addition to the score test)
size
level at which a horizontal line is drawn on multiple threshold plot
my.xlab
(optional) x-axis label
xi.tol
numerical tolerance for threshold distance; if the absolute value of xi1.hat is less than xi.tol use linear interpolation
to evaluate score vectors, expected Fisher information matrices, Hessians
Details
The default method is "Grimshaw" using the reduction of the parameters to a one-dimensional
maximization. Other options are one-dimensional maximization of the profile the nlm function or optim.
Two-dimensional optimisation using 2D-optimization ismev using the routine
from gpd.fit from the ismev library, with the addition of the algebraic gradient.
The choice of GP.fit should make no difference but the options were kept.
Warning: the function is not robust
and will not recover from failure of the maximization routine, returning various error messages.
Value
a plot of P-values for the test at the different thresholds u
Author(s)
Paul J. Northrop and Claire L. Coleman
References
Grimshaw (1993). Computing Maximum Likelihood Estimates for the Generalized
Pareto Distribution, Technometrics, 35(2), 185–191.
Northrop & Coleman (2014). Improved threshold diagnostic plots for extreme value
analyses, Extremes, 17(2), 289–303.
Wadsworth & Tawn (2012). Likelihood-based procedures for threshold
diagnostics and uncertainty in extreme value modelling, J. R. Statist. Soc. B, 74(3), 543-???567.
Examples
## Not run:
library(ismev)
data(rain)
u <- quantile(rain, seq(0.85,0.99,by=0.01))
NC.diag(rain, u, size=0.05)
## End(Not run)