plot method for class
"ithreshpred". Produces plots to
summarise the predictive inferences made by
an object of class "ithreshpred", a result of a call to
Additional arguments passed on to
A logical scalar. Only relevant if
A logical scalar. If
Single threshold case, where
predict.ithresh was called with numeric scalar
which_u = "best".
plot.evpred is called to produce the plot.
Multiple threshold case, where
predict.ithresh was called with
which_u = "all".
plot.evpred is called but now the
estimated predictive distribution function (
type = "p" used
in the call to
predict.ithresh) or density function
type = "d") is plotted for each of the training thresholds
(grey lines) as is the result of the weighted average over the
different training thresholds (black line).
If graphical parameters, such as
are passed via
... then the first element relates to the
weighted average and the remaining
length(x$u_vec) elements to
the respective training thresholds in
A list containing the graphical parameters using in producing the plot including any arguments supplied via ... is returned (invisibly).
ithresh for threshold selection in the i.i.d. case
based on leave-one-out cross-validation.
predict.ithresh for predictive inference for the
largest value observed in N years.
summary.ithresh Summarizing measures of threshold
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
u_vec_gom <- quantile(gom, probs = seq(0, 0.9, by = 0.05)) gom_cv <- ithresh(data = gom, u_vec = u_vec_gom, n_v = 3) # Note: gom_cv$npy contains the correct value of npy (it was set in the # call to ithresh, via attr(gom, "npy"). # If object$npy doesn't exist then the argument npy must be supplied # in the call to predict(). ### Best training threshold based on the lowest validation threshold # Predictive distribution function npy_gom <- length(gom)/105 best_p <- predict(gom_cv, n_years = c(100, 1000)) plot(best_p) # Predictive density function best_d <- predict(gom_cv, type = "d", n_years = c(100, 1000)) plot(best_d) ### All thresholds plus weighted average of inferences over all thresholds # Predictive distribution function all_p <- predict(gom_cv, which_u = "all") plot(all_p) # Predictive density function all_d <- predict(gom_cv, which_u = "all", type = "d") plot(all_d) ### ... and highlight the best threshold plot(all_p, add_best = TRUE) plot(all_d, add_best = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.