tcplot(data, tlim = NULL, nt = min(100, length(data)),
p.or.n = FALSE, alpha = 0.05, ylim.xi = NULL,
ylim.sigmau = NULL, legend.loc = "bottomleft",
try.thresh = quantile(data, 0.9, na.rm = TRUE), ...)
tshapeplot(data, tlim = NULL,
nt = min(100, length(data)), p.or.n = FALSE,
alpha = 0.05, ylim = NULL, legend.loc = "bottomleft",
try.thresh = quantile(data, 0.9, na.rm = TRUE),
main = "Shape Threshold Stability Plot",
xlab = "Threshold u", ylab = "Shape Parameter", ...)
tscaleplot(data, tlim = NULL,
nt = min(100, length(data)), p.or.n = FALSE,
alpha = 0.05, ylim = NULL, legend.loc = "bottomleft",
try.thresh = quantile(data, 0.9, na.rm = TRUE),
main = "Modified Scale Threshold Stability Plot",
xlab = "Threshold u",
ylab = "Modified Scale Parameter", ...)
NULL
NULL
NULL
to use default
valuesFALSE
) or number of exceedances (TRUE
) be
given on upper x-axislegend
)NULL
tshapeplot
and
tscaleplot
produces the
threshold stability plot for the shape and scale
parameter respectively. They also returns a matrix
containing columns of the threshold, number of
exceedances, MLE shape/scale and their standard devation
and $100(1 - \alpha)%$ Wald confidence interval.
Where the observed information matrix is not obtainable
the standard deviation and confidence intervals are
NA
. For the tscaleplot
the modified scale quantities are also provided.
tcplot
produces both plots on
one graph and outputs a merged dataframe of results.try.thresh
. The GPD is fitted to the excesses
using maximum likelihood estimation. The estimated
parameters are plot as a horizontal line which is solid
above this threshold where the parameter from smaller
tail fraction should be the same if the GPD is a good
model (upto sample uncertainty). The threshold should
always be chosen to be as low as possible to reduce
sample uncertainty. Therefore, below the pre-chosen
threshold, where the GPD should not be a good model, the
line is dashed and the parameter estimates should now
deviate from the dashed line (otherwise a lower threshold
could be used). If no threshold limits are provided
tlim = NULL
then the lowest threshold is set to be
just below the median data point and the maximum
threshold is set to the 11th largest datapoint. This is a
slightly lower order statistic compared to that used in
the MRL plot mrlplot
function to account for the fact the maximum likelihood
estimation is likely to be very unreliable with 10 or
fewer datapoints.
The range of permitted thresholds is just below the
minimum datapoint and the second largest value. If there
are less unique values of data within the threshold range
than the number of threshold evalations requested, then
instead of a sequence of thresholds they will be set to
each unique datapoint, i.e. MLE will only be applied
where there is data.
The missing (NA
and NaN
) and non-finite
values are ignored.
The lower x-axis is the threshold and an upper axis
either gives the number of exceedances (p.or.n =
FALSE
) or proportion of excess (p.or.n = TRUE
).
Note that unlike the gpd
related functions the
missing values are ignored, so do not add to the lower
tail fraction. But ignoring the missing values is
consistent with all the other mixture model functions.mrlplot
and
tcplot
from
evd
libraryx = rnorm(1000)
tcplot(x)
tshapeplot(x, tlim = c(0, 2))
tscaleplot(x, tlim = c(0, 2), try.thresh = c(0.5, 1, 1.5))
tcplot(x, tlim = c(0, 2), try.thresh = c(0.5, 1, 1.5))
Run the code above in your browser using DataLab