diff --git a/docs/404.html b/docs/404.html index e336a4a..61d48f8 100644 --- a/docs/404.html +++ b/docs/404.html @@ -1,66 +1,27 @@ - - - - + + + + - Page not found (404) • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - -
-
- + +
+ + + - - -
+
+
-
+ + - - diff --git a/docs/articles/index.html b/docs/articles/index.html index ee9a364..4d77fe5 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -1,66 +1,12 @@ - - - - - - - -Articles • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Articles • threshr - + + - - - -
-
- -
- -
+
-
- - + + diff --git a/docs/articles/threshr-vignette.html b/docs/articles/threshr-vignette.html index 6dad602..b4c712f 100644 --- a/docs/articles/threshr-vignette.html +++ b/docs/articles/threshr-vignette.html @@ -19,6 +19,8 @@ + +
-

The threshr package deals primarily with the selection of thresholds for use in extreme value modelling. The underlying methodology is described in detail in Northrop, Attalides, and Jonathan (2017). Bayesian leave-one-out cross-validation is used to compare the extreme value predictive performance resulting from each of a set of thresholds. This assesses the trade-off between the model mis-specification bias that results from an inappropriately low threshold and the loss of precision of estimation from an unnecessarily high threshold. There many other approaches to address this bias-variance trade-off. See Scarrott and MacDonald (2012) for a review.

-

At the moment only the simplest case, where the data can be treated as independent identically distributed observations, is considered. In this case the model used is a combination of a binomial distribution for the number of exceedances of a given threshold and a generalized Pareto (GP) distribution for the amounts, the threshold excesses by which exceedances lie above a threshold. We refer to this as a binomial-GP model. Future releases of threshr will tackle more general situations.

-

We use the function ithresh to compare the predictive performances of each of a set of user-supplied thresholds. We also perform predictive inferences for future extreme values, using the predict method for objects returned from ithresh. These inferences can be based either on a single threshold or on a weighted average of inferences from multiple thresholds. The weighting reflects an estimated measure of the predictive performance of the threshold and can also incorporate user-supplied prior probabilities for each threshold.

-

A traditional simple graphical method to inform threshold selection is to plot estimates of, and confidence intervals for, the GP shape parameter \(\xi\) over a range of thresholds. This plot is used to choose a threshold above which the underlying GP shape parameter may be approximately constant. See Chapter 4 of Coles (2001) for details. Identifying a single threshold using this method is usually unrealistic but the plot can point to a range of thresholds that merit more sophisticated analysis. The threshr function stability produces this type of plot.

-
-

-Cross-validatory predictive performance for i.i.d. data

-

We provide a brief outline of the methodology underlying ithresh. For full details see Northrop, Attalides, and Jonathan (2017). Consider a set of training thresholds \(u_1, \ldots, u_k\). The validation threshold \(v = u_k\) defines validation data: indicators of whether or not an observation exceeds \(v\) and, if it does, the amount by which \(v\) is exceeded. For a given training threshold leave-one-out cross-validation estimates the quality of predictive inference for each of the individual omitted samples based on Bayesian inferences from a binomial-GP model. Importance sampling is used to reduce computation time: only two posterior samples are required for each training threshold. Simulation from the posterior distributions of the binomial-GP parameters is performed using the revdbayes package (Northrop 2017).

-

In the first release of threshr the binomial probability is assumed to be independent of the parameters of the GP distribution a priori. This will be relaxed in a later release. The user can choose from a selection of in-built prior distributions and may specify their own prior for GP models parameters. By default the Beta(1/2, 1/2) Jeffreys’ prior is used for the threshold exceedance probability of the binomial distribution and a generalization of the Maximal Data Information (MDI) prior is used for the GP parameters. See the documentation of ithresh and Northrop, Attalides, and Jonathan (2017) for details of the latter.

-

We use the storm peak significant wave heights datasets analysed in Northrop, Attalides, and Jonathan (2017) from the Gulf of Mexico (gom, with 315 observations) and the northern North Sea (ns, with 628 observations) to illustrate the code. There should be enough exceedances of the validation threshold \(v = u_k\) to enable the predictive performances of the training thresholds to be compared. Jonathan and Ewans (2013) recommend that when making inferences about a GP distribution there should be no fewer than 50 exceedances. We bear this rule-of-thumb in mind when setting the vectors of training thresholds below.

-
library(threshr)
-
-# Set the size of the posterior sample simulated at each threshold
-n <- 10000
-
-## North Sea significant wave heights
-
-# Set a vector of training thresholds
-u_vec_ns <- quantile(ns, probs = seq(0.1, 0.85, by = 0.05))
-# Compare the predictive performances of the training thresholds
-ns_cv <- ithresh(data = ns, u_vec = u_vec_ns, n = n)
-
-## Gulf of Mexico significant wave heights
-
-# Set a vector of training thresholds
-u_vec_gom <- quantile(gom, probs = seq(0.1, 0.8, by = 0.05))
-# Compare the predictive performances of the training thresholds
-gom_cv <- ithresh(data = gom, u_vec = u_vec_gom, n = n)
-

The default plot method for objects returned by ithresh is of the estimated measures of predictive performance, normalized to sum to 1, against training threshold. See equations (7) and (14) of Northrop, Attalides, and Jonathan (2017).

-
plot(ns_cv, lwd = 2, cex.axis = 0.8)
-mtext("North Sea : significant wave height / m", side = 3, line = 2.5)
-
-plot(gom_cv, lwd = 2, cex.axis = 0.8)
-mtext("Gulf of Mexico: significant wave height / m", side = 3, line = 2.5)
+

The threshr package deals primarily with the selection of +thresholds for use in extreme value modelling. The underlying +methodology is described in detail in Northrop, Attalides, and +Jonathan (2017). Bayesian leave-one-out cross-validation is used to +compare the extreme value predictive performance resulting from each of +a set of thresholds. This assesses the trade-off between the model +mis-specification bias that results from an inappropriately low +threshold and the loss of precision of estimation from an unnecessarily +high threshold. There many other approaches to address this +bias-variance trade-off. See Scarrott and +MacDonald (2012) for a review.

+

At the moment only the simplest case, where the data can be treated +as independent identically distributed observations, is considered. In +this case the model used is a combination of a binomial distribution for +the number of exceedances of a given threshold and a +generalized Pareto (GP) distribution for the amounts, the threshold +excesses by which exceedances lie above a threshold. We refer to +this as a binomial-GP model. Future releases of threshr +will tackle more general situations.

+

We use the function ithresh to compare the predictive +performances of each of a set of user-supplied thresholds. We also +perform predictive inferences for future extreme values, using the +predict method for objects returned from +ithresh. These inferences can be based either on a single +threshold or on a weighted average of inferences from multiple +thresholds. The weighting reflects an estimated measure of the +predictive performance of the threshold and can also incorporate +user-supplied prior probabilities for each threshold.

+

A traditional simple graphical method to inform threshold selection +is to plot estimates of, and confidence intervals for, the GP shape +parameter \(\xi\) over a range of +thresholds. This plot is used to choose a threshold above which the +underlying GP shape parameter may be approximately constant. See Chapter +4 of Coles (2001) for details. Identifying +a single threshold using this method is usually unrealistic but the plot +can point to a range of thresholds that merit more sophisticated +analysis. The threshr function stability +produces this type of plot.

+
+

Cross-validatory predictive performance for i.i.d. data +

+

We provide a brief outline of the methodology underlying +ithresh. For full details see Northrop, Attalides, and Jonathan (2017). +Consider a set of training thresholds \(u_1, \ldots, u_k\). The validation +threshold \(v = u_k\) defines +validation data: indicators of whether or not an observation exceeds +\(v\) and, if it does, the amount by +which \(v\) is exceeded. For a given +training threshold leave-one-out cross-validation estimates the quality +of predictive inference for each of the individual omitted samples based +on Bayesian inferences from a binomial-GP model. Importance sampling is +used to reduce computation time: only two posterior samples are required +for each training threshold. Simulation from the posterior distributions +of the binomial-GP parameters is performed using the +revdbayes package (Northrop +2017).

+

In the first release of threshr the binomial +probability is assumed to be independent of the parameters of the GP +distribution a priori. This will be relaxed in a later release. +The user can choose from a selection of in-built prior distributions and +may specify their own prior for GP models parameters. By default the +Beta(1/2, 1/2) Jeffreys’ prior is used for the threshold exceedance +probability of the binomial distribution and a generalization of the +Maximal Data Information (MDI) prior is used for the GP parameters. See +the documentation of ithresh and Northrop, Attalides, and Jonathan (2017) for +details of the latter.

+

We use the storm peak significant wave heights datasets analysed in +Northrop, Attalides, and Jonathan (2017) +from the Gulf of Mexico (gom, with 315 observations) and +the northern North Sea (ns, with 628 observations) to +illustrate the code. There should be enough exceedances of the +validation threshold \(v = u_k\) to +enable the predictive performances of the training thresholds to be +compared. Jonathan and Ewans (2013) +recommend that when making inferences about a GP distribution there +should be no fewer than 50 exceedances. We bear this rule-of-thumb in +mind when setting the vectors of training thresholds below.

+
+library(threshr)
+
+# Set the size of the posterior sample simulated at each threshold
+n <- 10000
+
+## North Sea significant wave heights
+
+# Set a vector of training thresholds
+u_vec_ns <- quantile(ns, probs = seq(0.1, 0.85, by = 0.05))
+# Compare the predictive performances of the training thresholds
+ns_cv <- ithresh(data = ns, u_vec = u_vec_ns, n = n)
+
+## Gulf of Mexico significant wave heights
+
+# Set a vector of training thresholds
+u_vec_gom <- quantile(gom, probs = seq(0.1, 0.8, by = 0.05))
+# Compare the predictive performances of the training thresholds
+gom_cv <- ithresh(data = gom, u_vec = u_vec_gom, n = n)
+

The default plot method for objects returned by ithresh +is of the estimated measures of predictive performance, normalized to +sum to 1, against training threshold. See equations (7) and (14) of +Northrop, Attalides, and Jonathan +(2017).

+
+plot(ns_cv, lwd = 2, cex.axis = 0.8)
+mtext("North Sea : significant wave height / m", side = 3, line = 2.5)
+
+plot(gom_cv, lwd = 2, cex.axis = 0.8)
+mtext("Gulf of Mexico: significant wave height / m", side = 3, line = 2.5)

-

The summary method identifies which training threshold is estimated to perform best.

-
summary(ns_cv)
-#>        v v quantile best u best u quantile index of u_vec
-#> 1 5.6972         85  2.204              25              4
-summary(gom_cv)
-#>       v v quantile best u best u quantile index of u_vec
-#> 1 4.607         80 3.3878              60             11
-

The plot method can also produce a plot of the posterior sample of the GP parameters generated using a training threshold chosen by the user, e.g. the argument which_u = 5 specifies the fifth element of the vector of training thresholds, or using the best threshold, as below.

-
# Plot of Generalized Pareto posterior sample at the best threshold
-# (based on the lowest validation threshold)
-plot(ns_cv, which_u = "best")
-plot(gom_cv, which_u = "best")
+

The summary method identifies which training threshold is estimated +to perform best.

+
+summary(ns_cv)
+#>        v v quantile best u best u quantile index of u_vec
+#> 1 5.6972         85  2.204              25              4
+summary(gom_cv)
+#>       v v quantile best u best u quantile index of u_vec
+#> 1 4.607         80 3.3878              60             11
+

The plot method can also produce a plot of the posterior sample of +the GP parameters generated using a training threshold chosen by the +user, e.g. the argument which_u = 5 specifies the fifth +element of the vector of training thresholds, or using the best +threshold, as below.

+
+# Plot of Generalized Pareto posterior sample at the best threshold
+# (based on the lowest validation threshold)
+plot(ns_cv, which_u = "best")
+plot(gom_cv, which_u = "best")

-
-

-Predictive inference for future extremes

-

Let \(M_N\) denote the largest value to be observed in a time period of length \(N\) years. The predict method for objects returned from ithresh performs predictive inference for \(M_N\) based either on a single training threshold or on a weighted average of inferences from multiple training thresholds.

-
-

-Single training threshold

-

By default the threshold that is estimated to perform best is used. A different threshold can be selected using the argument which_u. Using type = "d" produces the predictive density function. The values of \(N\) can be set using n_years. The default is \(N = 100\).

-
# Predictive distribution function
-best_p <- predict(gom_cv, n_years = c(100, 1000), type = "d")
-plot(best_p)
+
+

Predictive inference for future extremes +

+

Let \(M_N\) denote the largest value +to be observed in a time period of length \(N\) years. The predict method for objects +returned from ithresh performs predictive inference for +\(M_N\) based either on a single +training threshold or on a weighted average of inferences from multiple +training thresholds.

+
+

Single training threshold +

+

By default the threshold that is estimated to perform best is used. A +different threshold can be selected using the argument +which_u. Using type = "d" produces the +predictive density function. The values of \(N\) can be set using n_years. +The default is \(N = 100\).

+
+# Predictive distribution function
+best_p <- predict(gom_cv, n_years = c(100, 1000), type = "d")
+plot(best_p)

-
-

-Inferences averaged over multiple thresholds

-

This option is selected using which_u = "all". The user can specify a prior probability for each threshold using u_prior. The default is that all thresholds receive equal prior probability, in which case the weights applied to individual training thresholds are those displayed in the threshold diagnostic plot above. The default, type = "p" produces the predictive distribution function. If which_u = "all" then n_years must have length one. The default is \(N = 100\).

-
### All thresholds plus weighted average of inferences over all thresholds
-all_p <- predict(gom_cv, which_u = "all")
-plot(all_p)
+
+

Inferences averaged over multiple thresholds +

+

This option is selected using which_u = "all". The user +can specify a prior probability for each threshold using +u_prior. The default is that all thresholds receive equal +prior probability, in which case the weights applied to individual +training thresholds are those displayed in the threshold diagnostic plot +above. The default, type = "p" produces the predictive +distribution function. If which_u = "all" then +n_years must have length one. The default is \(N = 100\).

+
+### All thresholds plus weighted average of inferences over all thresholds
+all_p <- predict(gom_cv, which_u = "all")
+plot(all_p)

-

As we expect, the estimated distribution function obtained by the weighted average over all thresholds lies between the pointwise envelope of the curves of the individual thresholds.

+

As we expect, the estimated distribution function obtained by the +weighted average over all thresholds lies between the pointwise envelope +of the curves of the individual thresholds.

-
-

-References

+
+

References +

-
-

Coles, S. G. 2001. An Introduction to Statistical Modelling of Extreme Values. London: Springer.

+
+
+Coles, S. G. 2001. An Introduction to Statistical Modelling of +Extreme Values. London: Springer.
-
-

Jonathan, P., and K. Ewans. 2013. “Statistical Modelling of Extreme Ocean Environments for Marine Design : A Review.” Ocean Engineering 62: 91–109. https://doi.org/10.1016/j.oceaneng.2013.01.004.

+
+Jonathan, P., and K. Ewans. 2013. “Statistical Modelling of +Extreme Ocean Environments for Marine Design : A Review.” +Ocean Engineering 62: 91–109. https://doi.org/10.1016/j.oceaneng.2013.01.004.
-
-

Northrop, P. J. 2017. revdbayes: Ratio-of-Uniforms Sampling for Bayesian Extreme Value Analysis. https://CRAN.R-project.org/package=revdbayes.

+
+Northrop, P. J. 2017. revdbayes: +Ratio-of-Uniforms Sampling for Bayesian Extreme Value Analysis. https://CRAN.R-project.org/package=revdbayes.
-
-

Northrop, P. J., N. Attalides, and P. Jonathan. 2017. “Cross-Validatory Extreme Value Threshold Selection and Uncertainty with Application to Ocean Storm Severity.” Journal of the Royal Statistical Society: Series C (Applied Statistics) 66 (1): 93–120. https://doi.org/10.1111/rssc.12159.

+
+Northrop, P. J., N. Attalides, and P. Jonathan. 2017. +“Cross-Validatory Extreme Value Threshold Selection and +Uncertainty with Application to Ocean Storm Severity.” +Journal of the Royal Statistical Society: Series C (Applied +Statistics) 66 (1): 93–120. https://doi.org/10.1111/rssc.12159.
-
-

Scarrott, C., and A. MacDonald. 2012. “A Review of Extreme Value Threshold Estimation and Uncertainty Quantification.” REVSTAT - Statistical Journal 10 (1): 33–60. https://www.ine.pt/revstat/pdf/rs120102.pdf.

+
+Scarrott, C., and A. MacDonald. 2012. “A Review of Extreme Value +Threshold Estimation and Uncertainty Quantification.” REVSTAT +- Statistical Journal 10 (1): 33–60.
@@ -203,11 +311,13 @@

-

Site built with pkgdown 1.5.1.

+

+

Site built with pkgdown 2.0.7.

@@ -216,5 +326,7 @@

+ + diff --git a/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-4-1.png index e7d2446..bfe025e 100644 Binary files a/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-4-1.png and b/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-4-2.png b/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-4-2.png index 45b6b53..20396d5 100644 Binary files a/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-4-2.png and b/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-4-2.png differ diff --git a/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-6-1.png index f33c503..74682f1 100644 Binary files a/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-6-1.png and b/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-6-2.png b/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-6-2.png index 9aadde3..6fc244a 100644 Binary files a/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-6-2.png and b/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-6-2.png differ diff --git a/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-7-1.png b/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-7-1.png index f0abd57..e19bcde 100644 Binary files a/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-7-1.png and b/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-8-1.png b/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-8-1.png index 348dde8..d542335 100644 Binary files a/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-8-1.png and b/docs/articles/threshr-vignette_files/figure-html/unnamed-chunk-8-1.png differ diff --git a/docs/authors.html b/docs/authors.html index 302fc51..74f0741 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,66 +1,12 @@ - - - - - - - -Authors • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Authors and Citation • threshr + + - - - - - -
-
-
- -
+
- @@ -142,22 +92,20 @@

Authors

-
- +
- - + + diff --git a/docs/index.html b/docs/index.html index e30f2c9..912d296 100644 --- a/docs/index.html +++ b/docs/index.html @@ -27,6 +27,8 @@ + +
-
- - -
-

-Threshold Selection and Uncertainty for Extreme Value Analysis

-
-

-What does threshr do?

-

The threshr package deals primarily with the selection of thresholds for use in extreme value models. It also performs predictive inferences about future extreme values. These inferences can either be based on a single threshold or on a weighted average of inferences from multiple thresholds. The weighting reflects an estimated measure of the predictive performance of the threshold and can incorporate prior probabilities supplied by a user. At the moment only the simplest case, where the data can be treated as independent identically distributed observations, is considered, as described in Northrop et al. (2017). Future releases will tackle more general situations.

-
-
-

-A simple example

+
+ +

AppVeyor Build Status R-CMD-check Coverage Status CRAN_Status_Badge Downloads (monthly) Downloads (total)

+
+

Threshold Selection and Uncertainty for Extreme Value Analysis +

+
+

What does threshr do? +

+

The threshr package deals primarily with the selection of thresholds for use in extreme value models. It also performs predictive inferences about future extreme values. These inferences can either be based on a single threshold or on a weighted average of inferences from multiple thresholds. The weighting reflects an estimated measure of the predictive performance of the threshold and can incorporate prior probabilities supplied by a user. At the moment only the simplest case, where the data can be treated as independent identically distributed observations, is considered, as described in Northrop et al. (2017). Future releases will tackle more general situations.

+
+
+

A simple example +

The main function in the threshr package is ithresh. It uses Bayesian leave-one-out cross-validation to compare the extreme value predictive ability resulting from the use of each of a user-supplied set of thresholds. The following code produces a threshold diagnostic plot using a dataset gom containing 315 storm peak significant waveheights. We set a vector u_vec of thresholds; call ithresh, supplying the data and thresholds; and use then plot the results. In this minimal example (ithresh has further arguments) thresholds are judged in terms of the quality of prediction of whether the validation observation lies above the highest threshold in u_vec and, if it does, how much it exceeds this highest threshold.

-
library(threshr)
-u_vec_gom <- quantile(gom, probs = seq(0, 0.9, by = 0.05))
-gom_cv <- ithresh(data = gom, u_vec = u_vec_gom)
-plot(gom_cv)
-
-
-

-Installation

+
+library(threshr)
+u_vec_gom <- quantile(gom, probs = seq(0, 0.9, by = 0.05))
+gom_cv <- ithresh(data = gom, u_vec = u_vec_gom)
+plot(gom_cv)
+
+
+

Installation +

To get the current released version from CRAN:

-
install.packages("threshr")
+
+install.packages("threshr")
-
-

-Vignette

+
+

Vignette +

See vignette("threshr-vignette", package = "threshr") for an overview of the package.

@@ -127,49 +125,51 @@

-

Site built with pkgdown 1.5.1.

+

+

Site built with pkgdown 2.0.7.

@@ -178,5 +178,7 @@

Dev status

+ + diff --git a/docs/news/index.html b/docs/news/index.html index c512533..7b42448 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -1,66 +1,12 @@ - - - - - - - -Changelog • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Changelog • threshr - - + + - - -
-
- -
- -
+
-
-

-threshr 1.0.2 Unreleased -

-
-

-Bug fixes and minor improvements

-
    -
  • In ithresh() a user-supplied (log-)prior R function can now be set for the binomial probability p of threshold exceedance. The functionality requires at least version 1.3.4 of the revdbayes package.

  • +
    + +
    +

    Bug fixes and minor improvements

    +
    • Create the help file for the package correctly, with alias threshr-package.

    • +
    • Activated 3rd edition of the testthat package

    • +
    • README.md: Used app.codecov.io as base for codecov link.

    • +
    +
    +
    + +
    +

    Bug fixes and minor improvements

    +
    • Tests in test-box_cox.R and test-inv_box_cox.R have been modified to avoid errors in the upcoming new release of the testthat package.
    • +
    +
    +
    + +
    +

    Bug fixes and minor improvements

    +
    • In ithresh() a user-supplied (log-)prior R function can now be set for the binomial probability p of threshold exceedance. The functionality requires at least version 1.3.4 of the revdbayes package.

    • A print method for class ithresh has been added.

    • In plot.ithresh() a more informative error message is given if an inappropriate value of the argument which_v is supplied.

    • -
    • In predict.ithresh() further arguments can now be passed to revdbayes::predict.evpost. In particular, the level(s) of predictive intervals can be set. An example has been added to the documentation.

    • -
    +
  • In predict.ithresh() further arguments can now be passed to revdbayes::predict.evpost. In particular, the level(s) of predictive intervals can be set. An example has been added to the documentation.

  • +
  • pkgdown documentation at https://paulnorthrop.github.io/threshr/

  • +
  • revdbayes:: is used instead of revdbayes::: to avoid CRAN package check NOTEs.

  • +
-
-
-

-threshr 1.0.1 2019-03-01 -

-
-

-Bug fixes and minor improvements

-
    -
  • Some examples and tests are modified slightly to avoid using unrealistically high or low thresholds.

  • +
    + +
    +

    Bug fixes and minor improvements

    +
    • Some examples and tests are modified slightly to avoid using unrealistically high or low thresholds.

    • Dependence on R version changed to 3.3.0 to avoid CRAN NOTE.

    • -
    -
    +
+
-
- +
- - + + diff --git a/docs/pkgdown.css b/docs/pkgdown.css index c01e592..80ea5b8 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -56,8 +56,10 @@ img.icon { float: right; } -img { +/* Ensure in-page images don't run outside their container */ +.contents img { max-width: 100%; + height: auto; } /* Fix bug in bootstrap (only seen in firefox) */ @@ -78,11 +80,10 @@ dd { /* Section anchors ---------------------------------*/ a.anchor { - margin-left: -30px; - display:inline-block; - width: 30px; - height: 30px; - visibility: hidden; + display: none; + margin-left: 5px; + width: 20px; + height: 20px; background-image: url(./link.svg); background-repeat: no-repeat; @@ -90,17 +91,15 @@ a.anchor { background-position: center center; } -.hasAnchor:hover a.anchor { - visibility: visible; -} - -@media (max-width: 767px) { - .hasAnchor:hover a.anchor { - visibility: hidden; - } +h1:hover .anchor, +h2:hover .anchor, +h3:hover .anchor, +h4:hover .anchor, +h5:hover .anchor, +h6:hover .anchor { + display: inline-block; } - /* Fixes for fixed navbar --------------------------*/ .contents h1, .contents h2, .contents h3, .contents h4 { @@ -244,14 +243,14 @@ nav[data-toggle='toc'] .nav .nav > .active:focus > a { .ref-index th {font-weight: normal;} -.ref-index td {vertical-align: top;} +.ref-index td {vertical-align: top; min-width: 100px} .ref-index .icon {width: 40px;} .ref-index .alias {width: 40%;} .ref-index-icons .alias {width: calc(40% - 40px);} .ref-index .title {width: 60%;} .ref-arguments th {text-align: right; padding-right: 10px;} -.ref-arguments th, .ref-arguments td {vertical-align: top;} +.ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px} .ref-arguments .name {width: 20%;} .ref-arguments .desc {width: 80%;} @@ -264,31 +263,26 @@ table { /* Syntax highlighting ---------------------------------------------------- */ -pre { - word-wrap: normal; - word-break: normal; - border: 1px solid #eee; -} - -pre, code { +pre, code, pre code { background-color: #f8f8f8; color: #333; } +pre, pre code { + white-space: pre-wrap; + word-break: break-all; + overflow-wrap: break-word; +} -pre code { - overflow: auto; - word-wrap: normal; - white-space: pre; +pre { + border: 1px solid #eee; } -pre .img { +pre .img, pre .r-plt { margin: 5px 0; } -pre .img img { +pre .img img, pre .r-plt img { background-color: #fff; - display: block; - height: auto; } code a, pre a { @@ -305,9 +299,8 @@ a.sourceLine:hover { .kw {color: #264D66;} /* keyword */ .co {color: #888888;} /* comment */ -.message { color: black; font-weight: bolder;} -.error { color: orange; font-weight: bolder;} -.warning { color: #6A0366; font-weight: bolder;} +.error {font-weight: bolder;} +.warning {font-weight: bolder;} /* Clipboard --------------------------*/ @@ -365,3 +358,27 @@ mark { content: ""; } } + +/* Section anchors --------------------------------- + Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71 +*/ + +div.csl-bib-body { } +div.csl-entry { + clear: both; +} +.hanging-indent div.csl-entry { + margin-left:2em; + text-indent:-2em; +} +div.csl-left-margin { + min-width:2em; + float:left; +} +div.csl-right-inline { + margin-left:2em; + padding-left:1em; +} +div.csl-indent { + margin-left: 2em; +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js index 7e7048f..6f0eee4 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -80,7 +80,7 @@ $(document).ready(function() { var copyButton = ""; - $(".examples, div.sourceCode").addClass("hasCopyButton"); + $("div.sourceCode").addClass("hasCopyButton"); // Insert copy buttons: $(copyButton).prependTo(".hasCopyButton"); @@ -91,7 +91,7 @@ // Initialize clipboard: var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { text: function(trigger) { - return trigger.parentNode.textContent; + return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); } }); diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 2786c67..50e47bd 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,7 +1,7 @@ -pandoc: 2.7.3 -pkgdown: 1.5.1 +pandoc: 2.17.1.1 +pkgdown: 2.0.7 pkgdown_sha: ~ articles: threshr-vignette: threshr-vignette.html -last_built: 2020-09-05T14:05Z +last_built: 2023-09-02T15:30Z diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png new file mode 100644 index 0000000..17a3580 Binary files /dev/null and b/docs/reference/Rplot001.png differ diff --git a/docs/reference/Rplot002.png b/docs/reference/Rplot002.png new file mode 100644 index 0000000..92f3347 Binary files /dev/null and b/docs/reference/Rplot002.png differ diff --git a/docs/reference/Rplot003.png b/docs/reference/Rplot003.png new file mode 100644 index 0000000..e639bbf Binary files /dev/null and b/docs/reference/Rplot003.png differ diff --git a/docs/reference/Rplot004.png b/docs/reference/Rplot004.png new file mode 100644 index 0000000..3690f0f Binary files /dev/null and b/docs/reference/Rplot004.png differ diff --git a/docs/reference/Rplot005.png b/docs/reference/Rplot005.png new file mode 100644 index 0000000..a1ef70c Binary files /dev/null and b/docs/reference/Rplot005.png differ diff --git a/docs/reference/Rplot006.png b/docs/reference/Rplot006.png new file mode 100644 index 0000000..75a613f Binary files /dev/null and b/docs/reference/Rplot006.png differ diff --git a/docs/reference/gom.html b/docs/reference/gom.html index 46cc8ec..3f3355b 100644 --- a/docs/reference/gom.html +++ b/docs/reference/gom.html @@ -1,69 +1,14 @@ - - - - - - - -Storm peak significant wave heights from the Gulf of Mexico — gom • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Storm peak significant wave heights from the Gulf of Mexico — gom • threshr - - - - - - - - - - + + - - - -
-
- -
- -
+
@@ -136,49 +66,49 @@

Storm peak significant wave heights from the Gulf of Mexico

of Mexico.

-
gom
- - -

Format

+
+
gom
+
+
+

Format

A vector containing 315 observations.

-

Source

- +
+
+

Source

Oceanweather Inc. (2005) GOMOS -- Gulf of Mexico hindcast study.

-

References

- +
+
+

References

Northrop, P. J., N. Attalides, and P. Jonathan. (2017). Cross-Validatory Extreme Value Threshold Selection and Uncertainty with Application to Ocean Storm Severity. Journal of the Royal Statistical Society: Series C (Applied Statistics), 66(1), - 93-120. - doi:10.1111/rssc.12159.

+ 93-120. doi:10.1111/rssc.12159 +.

+
+
-
- +
- - + + diff --git a/docs/reference/index.html b/docs/reference/index.html index 60e9378..3cfc920 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,66 +1,12 @@ - - - - - - - -Function reference • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Function reference • threshr + + - - - - -
-
- -
- -
+
- - - - - - - - - - -
-

Package

+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - -
+

Package

-

threshr

+
+

threshr threshr-package

threshr: Threshold Selection and Uncertainty for Extreme Value Analysis

-

Threshold selection

+
+

Threshold selection

+

ithresh()

Threshold selection in the i.i.d. case (peaks over threshold)

+

stability()

Generalized Pareto parameter estimate stability

-

Example data

+
+

Example data

+

gom

Storm peak significant wave heights from the Gulf of Mexico

+

ns

Storm peak significant wave heights from the North Sea

-

Generics

+
+

Generics

+

plot(<ithresh>)

Plot diagnostics an ithresh object

+

plot(<ithreshpred>)

Plot diagnostics an ithreshpred object

+

plot(<stability>)

Plot diagnostics for a stability object

+

print(<ithresh>)

Print method for objects of class "ithresh"

+

Print method for objects of class "ithresh"

predict(<ithresh>)

Predictive inference for the largest value observed in N years.

+

summary(<ithresh>)

Summarizing measures of threshold predictive performance

- +
+
-
- +
- - + + diff --git a/docs/reference/ithresh-1.png b/docs/reference/ithresh-1.png index e1cb4f6..33c377c 100644 Binary files a/docs/reference/ithresh-1.png and b/docs/reference/ithresh-1.png differ diff --git a/docs/reference/ithresh.html b/docs/reference/ithresh.html index 3e35c6d..b1ff448 100644 --- a/docs/reference/ithresh.html +++ b/docs/reference/ithresh.html @@ -1,46 +1,5 @@ - - - - - - - -Threshold selection in the i.i.d. case (peaks over threshold) — ithresh • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Threshold selection in the i.i.d. case (peaks over threshold) — ithresh • threshr - - - - - - - - - - - + + - - -
-
- -
- -
+
@@ -149,67 +77,63 @@

Threshold selection in the i.i.d. case (peaks over threshold)

leave-one-out cross-validation in a Bayesian setup. These models are based on a Generalized Pareto (GP) distribution for threshold excesses and a binomial model for the probability of threshold -exceedance. See -Northrop et al. (2017) -for details.

+exceedance. See Northrop et al. (2017) for details.

-
ithresh(data, u_vec, ..., n_v = 1, npy = NULL, use_rcpp = TRUE)
+
+
ithresh(data, u_vec, ..., n_v = 1, npy = NULL, use_rcpp = TRUE)
+
-

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - -
data

A numeric vector of observations. Any missing values will +

+

Arguments

+
data
+

A numeric vector of observations. Any missing values will be removed. The argument npy (see below) may be supplied as an attribute of data using attr(data, "npy") <- value, -where value is the value of npy (see attr). -If npy is supplied twice, as both attr(data, "npy")) -and using the npy argument, then the former is used.

u_vec

A numeric vector. A vector of training thresholds +where value is the value of npy (see attr). +If npy is supplied twice, as both attr(data, "npy")) +and using the npy argument, then the former is used.

+ + +
u_vec
+

A numeric vector. A vector of training thresholds at which inferences are made from a binomial-GP model. These could be set at sample quantiles of data using -quantile. Any duplicated values will be removed.

...

Further (optional) arguments to be passed to the - revdbayes function - rpost_rcpp (or rpost), +quantile. Any duplicated values will be removed.

+ + +
...
+

Further (optional) arguments to be passed to the + revdbayes function + rpost_rcpp (or rpost), which use the generalized ratio-of-uniforms method to simulate from extreme value posterior distributions. - In particular:

    -
  • n The size of the posterior sample used to perform + In particular:

    • n The size of the posterior sample used to perform predictive inference. Default: n = 1000.

    • prior A prior for GP parameters to be passed to the - revdbayes function set_prior. + revdbayes function set_prior. Can be either a character scalar that chooses an in-built prior, or a user-supplied R function or pointer to a compiled C++ function. - See the set_prior documentation for details + See the set_prior documentation for details of the in-built priors. See the revdbayes vignette - Faster simulation + Faster simulation using revdbayes for information about creating - a pointer to a C++ function. See also the Examples section. If the user supplies and R function then rpost will be + a pointer to a C++ function. See also the Examples section. If the user supplies an R function then rpost will be used for posterior simulation, rather than (the faster) rpost_rcpp, regardless of the input value of use_rcpp. Default: prior = "mdi" with a = 0.6 and min_xi = -1. - This particular prior is studied in - Northrop et al. (2017).

    • + This particular prior is studied in Northrop et al. (2017).

    • h_prior A list of further arguments (hyperparameters) for the GP prior specified in prior.

    • bin_prior A prior for the threshold exceedance probability \(p\) to be passed to the revdbayes function - set_bin_prior. + set_bin_prior. Can either be a character scalar that chooses an in-built prior, or a user_supplied R function. Default: prior = "jeffreys", i.e. Beta(1/2, 1/2).

    • h_bin_prior A list of further arguments (hyperparameters) for the binomial prior specified in bin_prior. - See the set_bin_prior documentation for details + See the set_bin_prior documentation for details of the in-built priors.

    • trans A character scalar: either "none" or "BC". See rpost_rcpp for details. @@ -219,11 +143,11 @@

      Arg generalized ratio-of-uniforms algorithm more stable. If using trans = "none" produces an error for a particular posterior simulation then trans = "BC" is used instead.

    • -
n_v

A numeric scalar. + + + +

n_v
+

A numeric scalar. Each of the n_v largest values in u_vec will be used (separately) as a validation threshold for the training thresholds in u_vec that lie at or below that validation threshold. @@ -232,36 +156,38 @@

Arg If n_v = 2 then, in addition, the assessment is performed using u_vec[1], ..., u_vec[length(u_vec) - 1] with validation threshold u_vec[length(u_vec) - 1], -and so on.

npy

A numeric scalar. The mean number of observations per year +and so on.

+ + +
npy
+

A numeric scalar. The mean number of observations per year of data, after excluding any missing values, i.e. the number of non-missing observations divided by total number of years of non-missing - data. May be supplied using as an attribute attr(data, "npy") + data. May be supplied using as an attribute attr(data, "npy") of data instead.

The value of npy does not affect any calculation in ithresh, it only affects subsequent extreme value inferences using predict.ithresh. However, setting npy in the call to rpost, or as an attribute of data avoids the need to - supply npy when calling predict.ithresh.

use_rcpp

A logical scalar. If TRUE (the default) the -revdbayes function rpost_rcpp is used for + supply npy when calling predict.ithresh.

+ + +
use_rcpp
+

A logical scalar. If TRUE (the default) the +revdbayes function rpost_rcpp is used for posterior simulation. If FALSE, or if the user supplies an R function to set the prior for GP parameters, -the (slower) function rpost is used.

+the (slower) function rpost is used.

-

Value

+
+
+

Value

+ -

An object (list) of class "ithresh", containing the - components

    -
  • pred_perf: A numeric matrix with length(u_vec) +

    An object (list) of class "ithresh", containing the + components

    +

    +
    • pred_perf: A numeric matrix with length(u_vec) rows and n_v columns. Each column contains the values of the measure of predictive performance. Entries corresponding to cases where the training threshold is above the validation @@ -276,7 +202,7 @@

      Value

    • v_ps: A numeric vector. The values in u_ps that correspond to the validation thresholds.

    • sim_vals: A numeric matrix with 4 columns and - n x length(u_vec) rows. The \(j\)th block of + n x length(u_vec) rows. The \(j\)th block of n rows contains in columns 1-3 the posterior samples of the threshold exceedance probability, the GP scale parameter and the GP shape parameter respectively, @@ -287,141 +213,144 @@

      Value

    • data: The argument data to ithresh detailed above, with any missing values removed.

    • use_rcpp: A logical scalar indicating whether - rpost_rcpp (use_rcpp = TRUE) or - rpost (use_rcpp = FALSE) + rpost_rcpp (use_rcpp = TRUE) or + rpost (use_rcpp = FALSE) was used for posterior simulation.

    • for_post: A list containing arguments with which - rpost_rcpp - (or rpost) was called, including + rpost_rcpp + (or rpost) was called, including any user-supplied arguments to these functions.

    • call: The call to ithresh.

    • -
    - -

    Details

    - -

    For a given threshold in u_vec:

      -
    • the number of values in data that exceed the threshold, +

+
+

Details

+

For a given threshold in u_vec:

  • the number of values in data that exceed the threshold, and the amounts (the threshold excesses) by which these value exceed the threshold are calculated;

  • -
  • rpost_rcpp - (or rpost) is used to sample from the posterior +

  • rpost_rcpp + (or rpost) is used to sample from the posterior distributions of the parameters of a GP model for the threshold excesses and a binomial model for the probability of threshold exceedance;

  • the ability of this binomial-GP model to predict data thresholded at the validation threshold(s) specified by n_v is assessed using leave-one-out cross-validation (the measure of - this is given in equation (7) of - Northrop et al. (2017)).

  • -

See Northrop et al. (2017) - and the introductory threshr vignette for further details and examples.

-

References

- + this is given in equation (7) of Northrop et al. (2017).

+

See Northrop et al. (2017) and the introductory threshr vignette for + further details and examples.

+
+
+

References

Northrop, P.J. and Attalides, N. (2016) Posterior propriety in Bayesian extreme value analyses using reference priors Statistica Sinica, 26(2), 721--743 - https://doi.org/10.5705/ss.2014.034.

+ doi:10.5705/ss.2014.034 +.

Northrop, P. J., Attalides, N. and Jonathan, P. (2017) Cross-validatory extreme value threshold selection and uncertainty with application to ocean storm severity. Journal of the Royal Statistical Society Series C: Applied Statistics, 66(1), 93-120. - https://doi.org/10.1111/rssc.12159

+ doi:10.1111/rssc.12159

Jonathan, P. and Ewans, K. (2013) Statistical modelling of extreme ocean environments for marine design : a review. Ocean Engineering, 62, 91-109. - https://doi.org/10.1016/j.oceaneng.2013.01.004

-

See also

- -

plot.ithresh for the S3 plot method for objects of + doi:10.1016/j.oceaneng.2013.01.004

+
+
+

See also

+

plot.ithresh for the S3 plot method for objects of class ithresh.

-

summary.ithresh Summarizing measures of threshold +

summary.ithresh Summarizing measures of threshold predictive performance.

-

predict.ithresh for predictive inference for the +

predict.ithresh for predictive inference for the largest value observed in N years.

-

rpost in the - revdbayes package for details of the arguments +

rpost in the + revdbayes package for details of the arguments that can be passed to - rpost_rcpp/rpost.

-

set_prior and - set_bin_prior in the - revdbayes package for details of how to set a + rpost_rcpp/rpost.

+

set_prior and + set_bin_prior in the + revdbayes package for details of how to set a prior distributions for GP parameters and for the exceedance probability \(p\).

-

quantile.

- -

Examples

-
# Note: -# 1. Smoother plots result from making n larger than the default n = 1000. -# 2. In some examples below validation thresholds rather higher than is -# advisable have been used, with far fewer excesses than the minimum of -# 50 suggested by Jonathan and Ewans (2013). - -## North Sea significant wave heights, default prior ----------------------- -#' # A plot akin to the top left of Figure 7 in Northrop et al. (2017) -#' # ... but with fewer training thresholds - -u_vec_ns <- quantile(ns, probs = seq(0.1, 0.9, by = 0.1)) -ns_cv <- ithresh(data = ns, u_vec = u_vec_ns, n_v = 2) -plot(ns_cv, lwd = 2, add_legend = TRUE, legend_pos = "topright")
mtext("significant wave height / m", side = 3, line = 2.5)
-## Gulf of Mexico significant wave heights, default prior ------------------ - -u_vec_gom <- quantile(gom, probs = seq(0.2, 0.9, by = 0.1)) -# Setting a prior using its name and parameter value(s) -------------------- -# This example gives the same prior as the default -gom_cv <- ithresh(data = gom, u_vec = u_vec_gom, n_v = 2, prior = "mdi", - h_prior = list(a = 0.6)) - -## Setting a user-defined (log-)prior R function --------------------------- -# This example also gives the same prior as the default -# (It will take longer to run than the example above because ithresh detects -# that the prior is an R function and sets use_rcpp to FALSE.) -# \donttest{ -user_prior <- function(pars, a, min_xi = -1) { - if (pars[1] <= 0 | pars[2] < min_xi) { - return(-Inf) - } - return(-log(pars[1]) - a * pars[2]) -} -user_bin_prior <- function(p, ab) { - return(stats::dbeta(p, shape1 = ab[1], shape2 = ab[2], log = TRUE)) -} -gom_cv <- ithresh(data = gom, u_vec = u_vec_gom, n_v = 2, prior = user_prior, - h_prior = list(a = 0.6), bin_prior = user_bin_prior, - h_bin_prior = list(ab = c(1 / 2, 1 / 2))) -# } -## Setting a user-defined (log-)prior (pointer to a) C++ function ---------- -# We make use of a C++ function and function create_prior_xptr() to create -# the required pointer from the revdbayes package +

quantile.

+
-prior_ptr <- revdbayes::create_prior_xptr("gp_flat") -gom_cv <- ithresh(data = gom, u_vec = u_vec_gom, n_v = 2, prior = prior_ptr, - h_prior = list(min_xi = -1))
+
+

Examples

+
# Note:
+# 1. Smoother plots result from making n larger than the default n = 1000.
+# 2. In some examples below validation thresholds rather higher than is
+#    advisable have been used, with far fewer excesses than the minimum of
+#    50 suggested by Jonathan and Ewans (2013).
+
+## North Sea significant wave heights, default prior -----------------------
+#' # A plot akin to the top left of Figure 7 in Northrop et al. (2017)
+#' # ... but with fewer training thresholds
+
+u_vec_ns <- quantile(ns, probs = seq(0.1, 0.9, by = 0.1))
+ns_cv <- ithresh(data = ns, u_vec = u_vec_ns, n_v = 2)
+plot(ns_cv, lwd = 2, add_legend = TRUE, legend_pos = "topright")
+mtext("significant wave height / m", side = 3, line = 2.5)
+
+
+## Gulf of Mexico significant wave heights, default prior ------------------
+
+u_vec_gom <- quantile(gom, probs = seq(0.2, 0.9, by = 0.1))
+# Setting a prior using its name and parameter value(s) --------------------
+# This example gives the same prior as the default
+gom_cv <- ithresh(data = gom, u_vec = u_vec_gom, n_v = 2, prior = "mdi",
+                  h_prior = list(a = 0.6))
+
+## Setting a user-defined (log-)prior R function ---------------------------
+# This example also gives the same prior as the default
+# (It will take longer to run than the example above because ithresh detects
+#  that the prior is an R function and sets use_rcpp to FALSE.)
+# \donttest{
+user_prior <- function(pars, a, min_xi = -1) {
+  if (pars[1] <= 0 | pars[2] < min_xi) {
+    return(-Inf)
+  }
+  return(-log(pars[1]) - a * pars[2])
+}
+user_bin_prior <- function(p, ab) {
+  return(stats::dbeta(p, shape1 = ab[1], shape2 = ab[2], log = TRUE))
+}
+gom_cv <- ithresh(data = gom, u_vec = u_vec_gom, n_v = 2, prior = user_prior,
+                  h_prior = list(a = 0.6), bin_prior = user_bin_prior,
+                  h_bin_prior = list(ab = c(1 / 2, 1 / 2)))
+# }
+## Setting a user-defined (log-)prior (pointer to a) C++ function ----------
+# We make use of a C++ function and function create_prior_xptr() to create
+# the required pointer from the revdbayes package
+
+prior_ptr <- revdbayes::create_prior_xptr("gp_flat")
+gom_cv <- ithresh(data = gom, u_vec = u_vec_gom, n_v = 2, prior = prior_ptr,
+                  h_prior = list(min_xi = -1))
+
+
+
-
- +
- - + + diff --git a/docs/reference/ns.html b/docs/reference/ns.html index 4051edb..568a013 100644 --- a/docs/reference/ns.html +++ b/docs/reference/ns.html @@ -1,69 +1,14 @@ - - - - - - - -Storm peak significant wave heights from the North Sea — ns • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Storm peak significant wave heights from the North Sea — ns • threshr - - - - - - - - - - + + - - - -
-
- -
- -
+
@@ -136,49 +66,49 @@

Storm peak significant wave heights from the North Sea

Sea.

-
ns
- - -

Format

+
+
ns
+
+
+

Format

A vector containing 628 observations.

-

Source

- +
+
+

Source

Oceanweather Inc. (1995) NEXT -- North Sea hindcast study.

-

References

- +
+
+

References

Northrop, P. J., N. Attalides, and P. Jonathan. (2017). Cross-Validatory Extreme Value Threshold Selection and Uncertainty with Application to Ocean Storm Severity. Journal of the Royal Statistical Society: Series C (Applied Statistics), 66(1), - 93-120. - doi:10.1111/rssc.12159.

+ 93-120. doi:10.1111/rssc.12159 +.

+
+
-
- +
- - + + diff --git a/docs/reference/plot.ithresh-1.png b/docs/reference/plot.ithresh-1.png index af02110..8e0990e 100644 Binary files a/docs/reference/plot.ithresh-1.png and b/docs/reference/plot.ithresh-1.png differ diff --git a/docs/reference/plot.ithresh-2.png b/docs/reference/plot.ithresh-2.png index bdf3eb5..9962042 100644 Binary files a/docs/reference/plot.ithresh-2.png and b/docs/reference/plot.ithresh-2.png differ diff --git a/docs/reference/plot.ithresh-3.png b/docs/reference/plot.ithresh-3.png index bae5fd6..23f614d 100644 Binary files a/docs/reference/plot.ithresh-3.png and b/docs/reference/plot.ithresh-3.png differ diff --git a/docs/reference/plot.ithresh.html b/docs/reference/plot.ithresh.html index 14750fe..ea104eb 100644 --- a/docs/reference/plot.ithresh.html +++ b/docs/reference/plot.ithresh.html @@ -1,71 +1,16 @@ - - - - - - - -Plot diagnostics an ithresh object — plot.ithresh • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Plot diagnostics an ithresh object — plot.ithresh • threshr - - + + - - -
-
- -
- -
+
-

plot method for class "ithresh". Produces an extreme value +

plot method for class "ithresh". Produces an extreme value threshold diagnostic plot based on an analysis performed by -ithresh. Can also be used to produce a plot of -the posterior sample generated by ithresh for a particular +ithresh. Can also be used to produce a plot of +the posterior sample generated by ithresh for a particular training threshold.

-
# S3 method for ithresh
-plot(
-  x,
-  y,
-  ...,
-  which_v = NULL,
-  prob = TRUE,
-  top_scale = TRUE,
-  add_legend = FALSE,
-  legend_pos = "topleft",
-  which_u = NULL
-)
- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
x

an object of class "ithresh", a result of a call to -ithresh.

y

Not used.

...

Additional arguments passed on to matplot -and/or legend and/or axis. +

+
# S3 method for ithresh
+plot(
+  x,
+  y,
+  ...,
+  which_v = NULL,
+  prob = TRUE,
+  top_scale = TRUE,
+  add_legend = FALSE,
+  legend_pos = "topleft",
+  which_u = NULL
+)
+
+ +
+

Arguments

+
x
+

an object of class "ithresh", a result of a call to +ithresh.

+ + +
y
+

Not used.

+ + +
...
+

Additional arguments passed on to matplot +and/or legend and/or axis. If which_u is supplied then these arguments are passed to -plot.evpost.

which_v

A numeric scalar or vector.

+plot.evpost.

+ + +
which_v
+

A numeric scalar or vector.

If which_u is not supplied (a threshold diagnostic plot is required) which_v specifies the validation thresholds, that is, the components of x$v_vec, to include in the plot.

@@ -183,128 +113,140 @@

Arg that indicates which element of object$v_vec is used in selecting a single threshold (if which_u = "best"). Note: the default, which_v = 1 gives the lowest of the - validation thresholds in object$v_vec.

prob

A logical scalar. If TRUE then the levels of thresholds + validation thresholds in object$v_vec.

+ + +
prob
+

A logical scalar. If TRUE then the levels of thresholds are represented by the proportion of observations that lie below a threshold. If prob = FALSE then the values of the thresholds are -used.

top_scale

A logical scalar indicating Whether or not to add a scale +used.

+ + +
top_scale
+

A logical scalar indicating Whether or not to add a scale to the top horizontal axis. If this is added it gives the threshold on -the scale not chosen by prob.

add_legend

A logical scalar indicating whether or not to add a +the scale not chosen by prob.

+ + +
add_legend
+

A logical scalar indicating whether or not to add a legend to the plot. If method = "cv" then the legend gives the -levels of the validation thresholds.

legend_pos

The position of the legend (if required) specified using -the argument x in legend.

which_u

Either a character scalar or a numeric scalar. - If which_u is supplied then plot.evpost +levels of the validation thresholds.

+ + +
legend_pos
+

The position of the legend (if required) specified using +the argument x in legend.

+ + +
which_u
+

Either a character scalar or a numeric scalar. + If which_u is supplied then plot.evpost is used to produce a plot of the posterior sample generated using a particular training threshold. By default a scatter plot of the posterior sample of Generalized Pareto parameters is produced.

If which_u = "best" then the training threshold achieving the largest measure of predictive performance in object$pred_perf, based on the validation threshold selected using which_v, is used. - See summary.ithresh to print the best thresholds for each + See summary.ithresh to print the best thresholds for each validation threshold.

Otherwise, which_u is a numeric scalar that selects training threshold x$u_vec[which_u]. Therefore, which_u must - be an integer in 1, ..., length(x$u_vec).

- -

Value

- -

If which_u is supplied then the object with which - plot.evpost was called is returned (invisibly). - Otherwise, a list is returned (again invisibly) with two components. - x is a vector containing the coordinates plotted on the - (lower) horizontal axis. - y is an length(u_vec) by n_v matrix of - threshold weights obtained by normalising the columns of the - matrix pred_perf returned by ithresh. - See equation (14) of - Northrop et al. (2017).

-

Details

- + be an integer in 1, ..., length(x$u_vec).

+ +
+
+

Value

+ + +

If which_u is supplied then the object with which

+

+

plot.evpost was called is returned (invisibly). + Otherwise, a list is returned (again invisibly) with two components.

+

+

x is a vector containing the coordinates plotted on the + (lower) horizontal axis.

+

+

y is an length(u_vec) by n_v matrix of

+

+

threshold weights obtained by normalising the columns of the + matrix pred_perf returned by ithresh. + See equation (14) of Northrop et al. (2017).

+
+
+

Details

Produces plots of the threshold weights, defined in - equation (14) of - Northrop et al. (2017), - against training threshold. A line is produced for each of the validation - thresholds chosen in which_v. The result is a plot like those in - the top row of Figure 7 in - Northrop et al. (2017).

+ equation (14) of Northrop et al. (2017) against training threshold. A line + is produced for each of the validation thresholds chosen in which_v. + The result is a plot like those in the top row of Figure 7 in + Northrop et al. (2017).

It is possible that a curve on the plot may be incomplete. This indicates that, for a particular threshold level, a measure of predictive performance is -Inf. This occurs when an observation in the data lies above the estimated upper end point of the predictive distribution produced when this observation is removed.

-

See also

- -

ithresh for threshold selection in the i.i.d. case +

+
+

See also

+

ithresh for threshold selection in the i.i.d. case based on leave-one-out cross-validation.

-

summary.ithresh Summarizing measures of threshold +

summary.ithresh Summarizing measures of threshold predictive performance.

-

print.ithresh Prints the threshold weights.

-

predict.ithresh for predictive inference for the +

print.ithresh Prints the threshold weights.

+

predict.ithresh for predictive inference for the largest value observed in N years.

+
-

Examples

-
# [Smoother plots result from making n larger than the default n = 1000.] - -# Threshold diagnostic plot -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) -plot(gom_cv, lwd = 2, add_legend = TRUE, legend_pos = "topleft")
mtext("significant wave height / m", side = 3, line = 2.5)
-# Plot of Generalized Pareto posterior sample at the best threshold -# (based on the lowest validation threshold) -plot(gom_cv, which_u = "best")
# See which threshold was used -summary(gom_cv)
#> v v quantile best u best u quantile index of u_vec -#> 1 4.6070 80 3.3878 60 13 -#> 2 5.1302 85 3.3878 60 13 -#> 3 5.8246 90 3.6545 65 14
-# Plot of Generalized Pareto posterior sample at the highest threshold -n_u <- length(u_vec_gom) -plot(gom_cv, which_u = n_u, points_par = list(pch = 20, col = "grey"))
+
+

Examples

+
# [Smoother plots result from making n larger than the default n = 1000.]
+
+# Threshold diagnostic plot
+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)
+plot(gom_cv, lwd = 2, add_legend = TRUE, legend_pos = "topleft")
+mtext("significant wave height / m", side = 3, line = 2.5)
+
+
+# Plot of Generalized Pareto posterior sample at the best threshold
+# (based on the lowest validation threshold)
+plot(gom_cv, which_u = "best")
+
+# See which threshold was used
+summary(gom_cv)
+#>        v v quantile best u best u quantile index of u_vec
+#> 1 4.6070         80 3.6545              65             14
+#> 2 5.1302         85 3.6545              65             14
+#> 3 5.8246         90 3.6545              65             14
+
+# Plot of Generalized Pareto posterior sample at the highest threshold
+n_u <- length(u_vec_gom)
+plot(gom_cv, which_u = n_u, points_par = list(pch = 20, col = "grey"))
+
+
+
+
-
- +
- - + + diff --git a/docs/reference/plot.ithreshpred-1.png b/docs/reference/plot.ithreshpred-1.png index 75b4e39..1a4deb1 100644 Binary files a/docs/reference/plot.ithreshpred-1.png and b/docs/reference/plot.ithreshpred-1.png differ diff --git a/docs/reference/plot.ithreshpred-2.png b/docs/reference/plot.ithreshpred-2.png index a022ac2..3a23373 100644 Binary files a/docs/reference/plot.ithreshpred-2.png and b/docs/reference/plot.ithreshpred-2.png differ diff --git a/docs/reference/plot.ithreshpred-3.png b/docs/reference/plot.ithreshpred-3.png index 3a630eb..7f4d7d3 100644 Binary files a/docs/reference/plot.ithreshpred-3.png and b/docs/reference/plot.ithreshpred-3.png differ diff --git a/docs/reference/plot.ithreshpred-4.png b/docs/reference/plot.ithreshpred-4.png index 9503a05..0604f25 100644 Binary files a/docs/reference/plot.ithreshpred-4.png and b/docs/reference/plot.ithreshpred-4.png differ diff --git a/docs/reference/plot.ithreshpred-5.png b/docs/reference/plot.ithreshpred-5.png index 2348ebc..ed97aa9 100644 Binary files a/docs/reference/plot.ithreshpred-5.png and b/docs/reference/plot.ithreshpred-5.png differ diff --git a/docs/reference/plot.ithreshpred-6.png b/docs/reference/plot.ithreshpred-6.png index 13ae821..ee52528 100644 Binary files a/docs/reference/plot.ithreshpred-6.png and b/docs/reference/plot.ithreshpred-6.png differ diff --git a/docs/reference/plot.ithreshpred.html b/docs/reference/plot.ithreshpred.html index 9e92fdc..2f00ae2 100644 --- a/docs/reference/plot.ithreshpred.html +++ b/docs/reference/plot.ithreshpred.html @@ -1,68 +1,13 @@ - - - - - - - -Plot diagnostics an ithreshpred object — plot.ithreshpred • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Plot diagnostics an ithreshpred object — plot.ithreshpred • threshr + + - - - - -
-
- -
- -
+

plot method for class "ithreshpred". Produces plots to -summarise the predictive inferences made by predict.ithresh.

+summarise the predictive inferences made by predict.ithresh.

+
+ +
+
# S3 method for ithreshpred
+plot(x, ..., ave_only = FALSE, add_best = FALSE)
-
# S3 method for ithreshpred
-plot(x, ..., ave_only = FALSE, add_best = FALSE)
+
+

Arguments

+
x
+

an object of class "ithreshpred", a result of a call to +ithresh.

-

Arguments

- - - - - - - - - - - - - - - - - - -
x

an object of class "ithreshpred", a result of a call to -ithresh.

...

Additional arguments passed on to -plot.evpred.

ave_only

A logical scalar. Only relevant if -predict.ithresh was called with which_u = "all". + +

...
+

Additional arguments passed on to +plot.evpred.

+ + +
ave_only
+

A logical scalar. Only relevant if +predict.ithresh was called with which_u = "all". If TRUE then plot only a curve for the weighted average over multiple training thresholds. -If FALSE then also plot a curve for each training threshold.

add_best

A logical scalar. If TRUE then the best +If FALSE then also plot a curve for each training threshold.

+ + +
add_best
+

A logical scalar. If TRUE then the best threshold, as judged using the validation threshold selected using the -argument which_v supplied to predict.ithresh, is -highlighted by plotting it with a different line style.

+argument which_v supplied to predict.ithresh, is +highlighted by plotting it with a different line style.

-

Value

+
+
+

Value

+ -

A list containing the graphical parameters using in producing the +

A list containing the graphical parameters using in producing the plot including any arguments supplied via ... is returned (invisibly).

-

Details

- +
+
+

Details

Single threshold case, where - predict.ithresh was called with numeric scalar + predict.ithresh was called with numeric scalar which_u or which_u = "best". - plot.evpred is called to produce the plot.

+ plot.evpred is called to produce the plot.

Multiple threshold case, where - predict.ithresh was called with which_u = "all". - Again, plot.evpred is called but now the + predict.ithresh was called with which_u = "all". + Again, plot.evpred is called but now the estimated predictive distribution function (type = "p" used - in the call to predict.ithresh) or density function + 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 lty, lwd or col are passed via ... then the first element relates to the - weighted average and the remaining length(x$u_vec) elements to + weighted average and the remaining length(x$u_vec) elements to the respective training thresholds in u_vec.

-

See also

- -

ithresh for threshold selection in the i.i.d. case +

+
+

See also

+

ithresh for threshold selection in the i.i.d. case based on leave-one-out cross-validation.

-

predict.ithresh for predictive inference for the +

predict.ithresh for predictive inference for the largest value observed in N years.

-

plot.ithresh for the S3 plot method for objects of +

plot.ithresh for the S3 plot method for objects of class ithresh.

-

summary.ithresh Summarizing measures of threshold +

summary.ithresh Summarizing measures of threshold predictive performance.

+
-

Examples

-
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)
+
+

Examples

+
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)
+
+
+
+
-
- +
- - + + diff --git a/docs/reference/plot.stability-1.png b/docs/reference/plot.stability-1.png index 62d6b23..7858ecd 100644 Binary files a/docs/reference/plot.stability-1.png and b/docs/reference/plot.stability-1.png differ diff --git a/docs/reference/plot.stability.html b/docs/reference/plot.stability.html index b01fade..3ee549d 100644 --- a/docs/reference/plot.stability.html +++ b/docs/reference/plot.stability.html @@ -1,68 +1,13 @@ - - - - - - - -Plot diagnostics for a stability object — plot.stability • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Plot diagnostics for a stability object — plot.stability • threshr + + - - - - -
-
- -
- -
+
-

plot method for objects of class "stability" returned from -stability

+

plot method for objects of class "stability" returned from +stability

+
+ +
+
# S3 method for stability
+plot(
+  x,
+  y,
+  ...,
+  prob = TRUE,
+  top_scale = c("none", "excesses", "opposite"),
+  vertical = TRUE
+)
-
# S3 method for stability
-plot(
-  x,
-  y,
-  ...,
-  prob = TRUE,
-  top_scale = c("none", "excesses", "opposite"),
-  vertical = TRUE
-)
- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - -
x

an object of class "stability", a result of a call to -stability.

y

Not used.

...

Additional arguments passed on to -matplot, axis -and/or segments.

prob

A logical scalar. If TRUE then the levels of thresholds +

+

Arguments

+
x
+

an object of class "stability", a result of a call to +stability.

+ + +
y
+

Not used.

+ + +
...
+

Additional arguments passed on to +matplot, axis +and/or segments.

+ + +
prob
+

A logical scalar. If TRUE then the levels of thresholds on the lower horizontal axis are represented by the proportion of observations that lie below a threshold. If prob = FALSE then the -values of the thresholds are used.

top_scale

A character scalar. +values of the thresholds are used.

+ + +
top_scale
+

A character scalar. If top_scale = "none" then no axis labels appear on the upper horizontal axis. If top_scale = "excesses" then the number of threshold excesses at each threshold are indicated. If top_scale = "opposite" then the type of threshold level -not chosen using prob is indicated.

vertical

A logical scalar. Should the confidence intervals be +not chosen using prob is indicated.

+ + +
vertical
+

A logical scalar. Should the confidence intervals be depicted using a vertical line for each threshold (TRUE) or by -joining up confidence limits across thresholds (FALSE)?

+joining up confidence limits across thresholds (FALSE)?

-

Value

+
+
+

Value

+ -

In addition to producing the plot a list of the arguments used - by matplot, axis is +

In addition to producing the plot a list of the arguments used + by matplot, axis is returned (invisibly).

-

Details

- +
+
+

Details

Produces a simple threshold diagnostic plot based on the object - returned from stability. + returned from stability. The MLEs of the GP shape parameter $\(\xi\)$ and approximate conf% confidence intervals for \(\xi\) are plotted against the threshold used to fit the GP model. @@ -204,39 +136,41 @@

Details Coles (2001). See also the vignette "Introducing threshr". as described in . See also the vignette "Introducing threshr".

-

See also

- - +
+
+

See also

+ +
-

Examples

-
u_vec_gom <- quantile(gom, probs = seq(0, 0.9, by = 0.05)) -gom_stab <- stability(data = gom, u_vec = u_vec_gom) -plot(gom_stab)
+
+

Examples

+
u_vec_gom <- quantile(gom, probs = seq(0, 0.9, by = 0.05))
+gom_stab <- stability(data = gom, u_vec = u_vec_gom)
+plot(gom_stab)
+
+
+
+
-
- +
- - + + diff --git a/docs/reference/predict.ithresh-1.png b/docs/reference/predict.ithresh-1.png index 2677e32..eae8846 100644 Binary files a/docs/reference/predict.ithresh-1.png and b/docs/reference/predict.ithresh-1.png differ diff --git a/docs/reference/predict.ithresh-2.png b/docs/reference/predict.ithresh-2.png index eb94b4a..43810fe 100644 Binary files a/docs/reference/predict.ithresh-2.png and b/docs/reference/predict.ithresh-2.png differ diff --git a/docs/reference/predict.ithresh-3.png b/docs/reference/predict.ithresh-3.png index fa8a7bc..508c4d4 100644 Binary files a/docs/reference/predict.ithresh-3.png and b/docs/reference/predict.ithresh-3.png differ diff --git a/docs/reference/predict.ithresh-4.png b/docs/reference/predict.ithresh-4.png index cfc38ff..95a3c0c 100644 Binary files a/docs/reference/predict.ithresh-4.png and b/docs/reference/predict.ithresh-4.png differ diff --git a/docs/reference/predict.ithresh-5.png b/docs/reference/predict.ithresh-5.png index c2f55b8..58d66be 100644 Binary files a/docs/reference/predict.ithresh-5.png and b/docs/reference/predict.ithresh-5.png differ diff --git a/docs/reference/predict.ithresh.html b/docs/reference/predict.ithresh.html index e76ab1d..9ffa795 100644 --- a/docs/reference/predict.ithresh.html +++ b/docs/reference/predict.ithresh.html @@ -1,46 +1,5 @@ - - - - - - - -Predictive inference for the largest value observed in N years. — predict.ithresh • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Predictive inference for the largest value observed in N years. — predict.ithresh • threshr - + + - - - -
-
- -
- -
+
@@ -141,147 +71,151 @@

Predictive inference for the largest value observed in N years.

either be based on a single training threshold or using a weighted average of inferences over multiple training thresholds. A single threshold may chosen to be the best performing threshold, as judged by the -measure of predictive performance calculated by ithresh or +measure of predictive performance calculated by ithresh or chosen by the user. The weights used in the latter case are based on the measures of predictive performance and prior probabilities assigned to the training thresholds. By default all thresholds are given the same prior probability but the user can specify their own prior.

-
# S3 method for ithresh
-predict(
-  object,
-  npy = NULL,
-  n_years = 100,
-  which_u = c("best", "all"),
-  which_v = 1L,
-  u_prior = rep(1, length(object$u_vec)),
-  type = c("p", "d", "q", "i", "r"),
-  hpd = FALSE,
-  x = NULL,
-  ...
-)
- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
object

An object of class "ithresh", a result of a call to -ithresh.

npy

A numeric scalar. The mean number of observations per year +

+
# S3 method for ithresh
+predict(
+  object,
+  npy = NULL,
+  n_years = 100,
+  which_u = c("best", "all"),
+  which_v = 1L,
+  u_prior = rep(1, length(object$u_vec)),
+  type = c("p", "d", "q", "i", "r"),
+  hpd = FALSE,
+  x = NULL,
+  ...
+)
+
+ +
+

Arguments

+
object
+

An object of class "ithresh", a result of a call to +ithresh.

+ + +
npy
+

A numeric scalar. The mean number of observations per year of data, after excluding any missing values, i.e. the number of non-missing observations divided by total number of years of non-missing -data.

n_years

A numeric vector. Value(s) of N. If which_u = "all" -then n_years must have length one.

which_u

Either a character scalar or a numeric scalar. +data.

+ + +
n_years
+

A numeric vector. Value(s) of N. If which_u = "all" +then n_years must have length one.

+ + +
which_u
+

Either a character scalar or a numeric scalar. If which_u is a character scalar it must be either "best" or "all".

If which_u = "best" then the single threshold achieving the largest measure of predictive performance in object$pred_perf, based on the validation threshold selected using which_v, is used to - perform prediction. See summary.ithresh to print the + perform prediction. See summary.ithresh to print the best thresholds for each validation threshold.

If which_u = "all" then all the thresholds are used to perform prediction. The inferences from each threshold are weighted according to the posterior threshold weights given in - equation (15) of - Northrop et al. (2017) - based on the prior probabilities of thresholds in u_prior - and column which_v of the measures of predictive performance in - object$pred_perf.

+ equation (15) of Northrop et al. (2017) based on the prior probabilities + of thresholds in u_prior and column which_v of the measures + of predictive performance in object$pred_perf.

Otherwise, which_u is a numeric scalar that indicates which element of object$u_vec the user wishes to select as a single threshold on which to base prediction, that is, which_u must - be an integer in 1, ..., length(object$u_vec).

which_v

A numeric scalar. Indicates which element of + be an integer in 1, ..., length(object$u_vec).

+ + +
which_v
+

A numeric scalar. Indicates which element of object$v_vec is used in selecting a single threshold (if which_u = "best") or weighting the inferences from all thresholds (if which_u = "all"). Note: the default, which_v = 1 gives the lowest of the -validation thresholds in object$v_vec.

u_prior

A numeric vector. Prior probabilities for the training +validation thresholds in object$v_vec.

+ + +
u_prior
+

A numeric vector. Prior probabilities for the training thresholds in object$u_vec. Only used if which_u = "all".

Only the first length(object$u_vec) - length(object$v_vec) + which_v elements of u_prior are used. This is because only training thresholds up to and including object$v_vec[which_v] are relevant. - u_prior must have length length(object$u_vec) or + u_prior must have length length(object$u_vec) or length(object$u_vec) - length(object$v_vec) + which_v.

If u_prior is not supplied then all (relevant) training thresholds are given equal prior probability. u_prior is normalized to have sum equal to 1 inside - predict.ithresh.

type

A character vector. - Passed to predict.evpost. - Indicates which type of inference is required:

    -
  • "p" for the predictive distribution function,

  • + predict.ithresh.

    + + +
    type
    +

    A character vector. + Passed to predict.evpost. + Indicates which type of inference is required:

    • "p" for the predictive distribution function,

    • "d" for the predictive density function,

    • "q" for the predictive quantile function,

    • "i" for predictive intervals (see ... to set level),

    • "r" for random generation from the predictive distribution.

    If which_u = "all" then only type = "p" or type = "d" - are allowed.

hpd

A logical scalar. The argument hpd of -predict.evpost. Only relevant if -type = "i".

x

A numeric vector. The argument x of -predict.evpost. In the current context this + are allowed.

+ + +
hpd
+

A logical scalar. The argument hpd of +predict.evpost. Only relevant if +type = "i".

+ + +
x
+

A numeric vector. The argument x of +predict.evpost. In the current context this must be a vector (not a matrix, as suggested by the documentation of -predict.evpost). If x is not supplied +predict.evpost). If x is not supplied then a default value is set within -predict.evpost.

...

Additional arguments to be passed to -predict.evpost. In particular: +predict.evpost.

+ + +
...
+

Additional arguments to be passed to +predict.evpost. In particular: level, which can be used to set (multiple) levels for predictive intervals when type = "i"; lower_tail (relevant when type = "p" or "q") and -log (relevant when type = "d").

- -

Value

- -

An list object of class "ithreshpred" with a similar structure to - an object of class "evpred" returned from - predict.evpost is returned invisibly. - In addition, the object contains - u_vec = object$u_vec and v_vec = object$v_vec, - which_v and the index best_u in - u_vec = object$u_vec of the best training threshold based on +log (relevant when type = "d").

+ +
+
+

Value

+ + +

An list object of class "ithreshpred" with a similar + structure to an object of class "evpred" returned from

+

+

predict.evpost is returned invisibly. + In addition, the object contains

+

+

u_vec = object$u_vec and v_vec = object$v_vec,

+

+

which_v and the index best_u in

+

+

u_vec = object$u_vec of the best training threshold based on the value of which_v. - It also contains the value of the Box-Cox transformation parameter - lambda. This will always be equal to 1 if object was + It also contains the value of the Box-Cox transformation parameter

+

+

lambda. This will always be equal to 1 if object was returned from ithresh.

-

If which_u = "all" then

    -
  • the list also contains the posterior threshold weights + + +

    If which_u = "all" then

    • the list also contains the posterior threshold weights in component post_thresh_wts

    • the component y is a matrix with length{x} rows and 1 + length(object$u_vec) - length(object$v_vec) + which_v @@ -290,96 +224,107 @@

      Value

      obtained using a weighted average of the inferences over different training thresholds. The other columns contain the estimated functions for each of the training thresholds in u_vec.

    • -
    - -

    Details

    - -

    The function predict.evpost is used to +

+
+

Details

+

The function predict.evpost is used to perform predictive based on the binomial-GP posterior sample generated using a given training threshold. For mathematical details of the single threshold and multiple threshold cases see Sections 2.3 and 3 of - Northrop et al. (2017) - respectively.

-

References

- + Northrop et al. (2017) respectively.

+
+
+

References

Northrop, P. J., Attalides, N. and Jonathan, P. (2017) Cross-validatory extreme value threshold selection and uncertainty with application to ocean storm severity. Journal of the Royal Statistical Society Series C: Applied - Statistics, 66(1), 93-120. - https://doi.org/10.1111/rssc.12159

-

See also

- -

ithresh for threshold selection in the i.i.d. case + Statistics, 66(1), 93-120. doi:10.1111/rssc.12159

+
+
+

See also

+

ithresh for threshold selection in the i.i.d. case based on leave-one-out cross-validation.

-

plot.ithreshpred for the S3 plot method for objects +

plot.ithreshpred for the S3 plot method for objects of class ithreshpred.

+
-

Examples

-
# Note: -#' In the examples below validation thresholds rather higher than is -# advisable have been used, with far fewer excesses than the minimum of -# 50 suggested by Jonathan and Ewans (2013). - -# Gulf of Mexico significant wave heights, default priors. -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 -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)
-# Predictive intervals -best_i <- predict(gom_cv, n_years = c(100, 1000), type = "i", hpd = TRUE, - level = c(95, 99)) -plot(best_i, which_int = "both")
-# See which threshold was used -summary(gom_cv)
#> v v quantile best u best u quantile index of u_vec -#> 1 4.6070 80 3.3878 60 13 -#> 2 5.1302 85 3.9754 70 15 -#> 3 5.8246 90 3.9754 70 15
-### 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)
+
+

Examples

+
# Note:
+#'  In the examples below validation thresholds rather higher than is
+#   advisable have been used, with far fewer excesses than the minimum of
+#   50 suggested by Jonathan and Ewans (2013).
+
+# Gulf of Mexico significant wave heights, default priors.
+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
+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)
+
+
+# Predictive intervals
+best_i <- predict(gom_cv, n_years = c(100, 1000), type = "i", hpd = TRUE,
+                  level = c(95, 99))
+plot(best_i, which_int = "both")
+#> Warning: argument 1 does not name a graphical parameter
+
+
+# See which threshold was used
+summary(gom_cv)
+#>        v v quantile best u best u quantile index of u_vec
+#> 1 4.6070         80 3.1598              55             12
+#> 2 5.1302         85 3.1598              55             12
+#> 3 5.8246         90 3.6545              65             14
+
+### 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)
+
+
+
+
-
- +
- - + + diff --git a/docs/reference/print.ithresh.html b/docs/reference/print.ithresh.html index 11dfc48..552413b 100644 --- a/docs/reference/print.ithresh.html +++ b/docs/reference/print.ithresh.html @@ -1,67 +1,12 @@ - - - - - - - -Print method for objects of class "ithresh" — print.ithresh • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Print method for objects of class "ithresh" — print.ithresh • threshr - - + + - - -
-
- -
- -
+
-

print method for class "ithresh".

+

print method for class "ithresh".

-
# S3 method for ithresh
-print(x, digits = 2, ...)
- -

Arguments

- - - - - - - - - - - - - - -
x

an object inheriting from class "ithresh", a result of a call to -ithresh.

digits

An integer. Used for number formatting with -format and signif.

...

Additional optional arguments. At present no optional -arguments are used.

- -

Value

- -

The argument x, invisibly, as for all - print methods.

-

Details

+
+
# S3 method for ithresh
+print(x, digits = 2, ...)
+
+ +
+

Arguments

+
x
+

an object inheriting from class "ithresh", a result of a +call to ithresh.

+ +
digits
+

An integer. Used for number formatting with +format and signif.

+ + +
...
+

Additional optional arguments. At present no optional +arguments are used.

+ +
+
+

Value

+ + +

The argument x, invisibly, as for all

+

+

print methods.

+
+
+

Details

Prints a matrix of the estimated threshold weights. Each row gives the weights for each training threshold for a given validation threshold. The row and column names are the approximate quantile levels of the thresholds.

-

See also

- -

ithresh for threshold selection in the i.i.d. case +

+
+

See also

+

ithresh for threshold selection in the i.i.d. case based on leave-one-out cross-validation.

-

summary.ithresh Summarizing measures of threshold +

summary.ithresh Summarizing measures of threshold predictive performance.

-

plot.ithresh for the S3 plot method for objects of +

plot.ithresh for the S3 plot method for objects of class ithresh.

-

predict.ithresh for predictive inference for the +

predict.ithresh for predictive inference for the largest value observed in N years.

+
+
-
- +
- - + + diff --git a/docs/reference/stability-1.png b/docs/reference/stability-1.png index 62d6b23..7858ecd 100644 Binary files a/docs/reference/stability-1.png and b/docs/reference/stability-1.png differ diff --git a/docs/reference/stability-2.png b/docs/reference/stability-2.png index a6664e2..71fdee2 100644 Binary files a/docs/reference/stability-2.png and b/docs/reference/stability-2.png differ diff --git a/docs/reference/stability.html b/docs/reference/stability.html index ce3d11b..df3bb83 100644 --- a/docs/reference/stability.html +++ b/docs/reference/stability.html @@ -1,73 +1,18 @@ - - - - - - - -Generalized Pareto parameter estimate stability — stability • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Generalized Pareto parameter estimate stability — stability • threshr - - - - - - - - - - + + - - - -
-
- -
- -
+
@@ -140,50 +70,50 @@

Generalized Pareto parameter estimate stability

The threshold excesses are treated as independent and identically distributed (i.i.d.) observations. The resulting estimates and confidence intervals can be plotted, -using plot.stability, +using plot.stability, to produce a crude graphical diagnostic for threshold choice.

-
stability(
-  data,
-  u_vec,
-  prof = FALSE,
-  conf = 95,
-  mult = 1:2,
-  plot_prof = FALSE,
-  ...
-)
- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
data

A numeric vector of observations.

u_vec

A numeric vector of thresholds to be applied to the data. +

+
stability(
+  data,
+  u_vec,
+  prof = FALSE,
+  conf = 95,
+  mult = 1:2,
+  plot_prof = FALSE,
+  ...
+)
+
+ +
+

Arguments

+
data
+

A numeric vector of observations.

+ + +
u_vec
+

A numeric vector of thresholds to be applied to the data. Any duplicated values will be removed. These could be set at sample -quantiles of data using quantile.

prof

A logical scalar. Whether to calculate confidence intervals +quantiles of data using quantile.

+ + +
prof
+

A logical scalar. Whether to calculate confidence intervals for the GP shape parameter \(\xi\) based on the profile-likelihood for \(\xi\) or using the MLE plus or minus a multiple of the estimated standard error (SE) of the MLE. The intervals produced by the former may be better but they take longer to calculate. -Default: FALSE.

conf

A numeric scalar in (0, 100). Confidence level for the -confidence intervals. Default: 95%.

mult

A numeric vector of length 2. The range of values over +Default: FALSE.

+ + +
conf
+

A numeric scalar in (0, 100). Confidence level for the +confidence intervals. Default: 95%.

+ + +
mult
+

A numeric vector of length 2. The range of values over which the profile log-likelihood for \(\xi\) is calculated is (MLE - mult[1] c SE, MLE + mult[2] c SE), where MLE and SE are the MLE and estimated standard error of \(\xi\) @@ -192,99 +122,125 @@

Arg when mult = c(1, 1). The default, mult = c(1, 2), works well in most cases. If the routine fails because the range of \(\xi\) is not sufficiently wide then the relevant components of mult -should be increased.

plot_prof

A logical scalar. Only relevant if prof = TRUE. +should be increased.

+ + +
plot_prof
+

A logical scalar. Only relevant if prof = TRUE. If plot_prof = TRUE then the profile log-likelihood is plotted -for each threshold. If FALSE then nothing is plotted.

...

Further (optional) arguments to be passed to the -optim function for the optimizations on which -the profile-likelihood for \(xi\) is based.

- -

Value

- -

An object (list) of class "stability" with components:

-
ests

MLEs of the GP shape parameter \(\xi\).

-
ses

Estimated SEs of the MLEs of \(\xi\).

-
lower

Lower limit of 100conf% confidence intervals +for each threshold. If FALSE then nothing is plotted.

+ + +
...
+

Further (optional) arguments to be passed to the +optim function for the optimizations on which +the profile-likelihood for \(xi\) is based.

+ +
+
+

Value

+ + +

An object (list) of class "stability" with components:

+
ests
+

MLEs of the GP shape parameter \(\xi\).

+ +
ses
+

Estimated SEs of the MLEs of \(\xi\).

+ +
lower
+

Lower limit of 100conf% confidence intervals for \(\xi\).

-
upper

Upper limit of 100conf% confidence intervals + +

upper
+

Upper limit of 100conf% confidence intervals for \(\xi\).

-
nexc

The number of threshold excesses.

-
u_vec

The thresholds supplied by the user.

-
u_ps

The approximate sample quantiles to which the thresholds + +

nexc
+

The number of threshold excesses.

+ +
u_vec
+

The thresholds supplied by the user.

+ +
u_ps
+

The approximate sample quantiles to which the thresholds in u_vec correspond.

-
data

The input data.

-
conf

The input conf.

- Each of these components is a numeric vector of length -length(u_vec). -

Details

+
data
+

The input data.

+
conf
+

The input conf.

+ +

Each of these components is a numeric vector of length +length(u_vec).

+
+
+

Details

For each threshold in u_vec a GP model is fitted by maximum likelihood estimation to the threshold excesses, i.e. the amounts by which the data exceed that threshold. The MLEs of the GP shape parameter \(\xi\) and approximate conf% confidence intervals - for \(\xi\) are stored for plotting (by plot.stability) + for \(\xi\) are stored for plotting (by plot.stability) to produce a simple graphical diagnostic to inform threshold selection. This plot is used to choose a threshold above which the underlying GP shape parameter may be approximately constant. See Chapter 4 of Coles (2001). See also the vignette "Introducing threshr".

-

References

- +
+
+

References

Coles, S. G. (2001) An Introduction to Statistical Modeling of Extreme Values, Springer-Verlag, London. - https://doi.org/10.1007/978-1-4471-3675-0_3

-

See also

- -

ithresh for threshold selection in the i.i.d. case + doi:10.1007/978-1-4471-3675-0_3

+
+
+

See also

+

ithresh for threshold selection in the i.i.d. case based on leave-one-out cross-validation.

-

plot.stability for the S3 plot method for +

plot.stability for the S3 plot method for objects of class stability.

-

quantile.

- -

Examples

-
# Set a vector of thresholds -u_vec_gom <- quantile(gom, probs = seq(0, 0.9, by = 0.05)) - -# Symmetric confidence intervals -gom_stab <- stability(data = gom, u_vec = u_vec_gom) -plot(gom_stab)
-# Profile-likelihood-based confidence intervals -gom_stab <- stability(data = gom, u_vec = u_vec_gom, prof = TRUE)
#> Fitting at threshold number ... -#> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
plot(gom_stab)
+

quantile.

+
+ +
+

Examples

+
# Set a vector of thresholds
+u_vec_gom <- quantile(gom, probs = seq(0, 0.9, by = 0.05))
+
+# Symmetric confidence intervals
+gom_stab <- stability(data = gom, u_vec = u_vec_gom)
+plot(gom_stab)
+
+
+# Profile-likelihood-based confidence intervals
+gom_stab <- stability(data = gom, u_vec = u_vec_gom, prof = TRUE)
+#> Fitting at threshold number ...
+#> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 
+plot(gom_stab)
+
+
+
+
-
- +
- - + + diff --git a/docs/reference/summary.ithresh.html b/docs/reference/summary.ithresh.html index 2a81a4a..c42842c 100644 --- a/docs/reference/summary.ithresh.html +++ b/docs/reference/summary.ithresh.html @@ -1,67 +1,12 @@ - - - - - - - -Summarizing measures of threshold predictive performance — summary.ithresh • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Summarizing measures of threshold predictive performance — summary.ithresh • threshr - - + + - - -
-
- -
- -
+
-

summary method for class "ithresh"

+

summary method for class "ithresh"

-
# S3 method for ithresh
-summary(object, ...)
- -

Arguments

- - - - - - - - - - -
object

an object of class "ithresh", a result of a call to -ithresh.

...

Additional optional arguments. At present no optional -arguments are used.

- -

Value

- -

Returns a numeric matrix with 5 columns and n_v rows, - where n_v is an argument to ithresh that +

+
# S3 method for ithresh
+summary(object, ...)
+
+ +
+

Arguments

+
object
+

an object of class "ithresh", a result of a call to +ithresh.

+ + +
...
+

Additional optional arguments. At present no optional +arguments are used.

+ +
+
+

Value

+ + +

Returns a numeric matrix with 5 columns and n_v rows, + where n_v is an argument to ithresh that determines how many of the largest training thresholds are used - a validation thresholds. The columns contain:

    -
  • column 1: the validation threshold v

  • + a validation thresholds. The columns contain:

    • column 1: the validation threshold v

    • column 2: the sample quantile to which the validation threshold corresponds

    • column 3: the best training threshold u judged using the @@ -165,48 +95,48 @@

      Value

      threshold corresponds

    • column 5: the index of the vector u_vec of training thresholds to which the threshold in column2 corresponds

    • -
    - -

    See also

    - -

    ithresh for threshold selection in the i.i.d. case +

+
+

See also

+

ithresh for threshold selection in the i.i.d. case based on leave-one-out cross-validation.

-

plot.ithresh for the S3 plot method for objects of +

plot.ithresh for the S3 plot method for objects of class ithresh.

-

print.ithresh Prints the threshold weights.

- -

Examples

-
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) -summary(gom_cv)
#> v v quantile best u best u quantile index of u_vec -#> 1 4.6070 80 3.3878 60 13 -#> 2 5.1302 85 3.9754 70 15 -#> 3 5.8246 90 3.9754 70 15
+

print.ithresh Prints the threshold weights.

+
+ +
+

Examples

+
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)
+summary(gom_cv)
+#>        v v quantile best u best u quantile index of u_vec
+#> 1 4.6070         80 3.3878              60             13
+#> 2 5.1302         85 3.3878              60             13
+#> 3 5.8246         90 3.3878              60             13
+
+
+
-
- +
- - + + diff --git a/docs/reference/threshr-internal.html b/docs/reference/threshr-internal.html index f591c12..01d67ff 100644 --- a/docs/reference/threshr-internal.html +++ b/docs/reference/threshr-internal.html @@ -1,67 +1,12 @@ - - - - - - - -Internal threshr functions — threshr-internal • threshr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Internal threshr functions — threshr-internal • threshr + + - - - - -
-
- -
- -
+
@@ -132,44 +62,42 @@

Internal threshr functions

Internal threshr functions

-
bc(x, lambda = 1, lambda_tol = 1/50, m = 4)
-
-inv_bc(x, lambda = 1, lambda_tol = 1/50, m = 4)
-
-yj(x, lambda = 1, lambda_tol = 1/50, m = 4)
-
-inv_yj(x, lambda = 1, lambda_tol = 1/50, m = 4)
- - -

Details

+
+
bc(x, lambda = 1, lambda_tol = 1/50, m = 4)
+
+inv_bc(x, lambda = 1, lambda_tol = 1/50, m = 4)
+
+yj(x, lambda = 1, lambda_tol = 1/50, m = 4)
+
+inv_yj(x, lambda = 1, lambda_tol = 1/50, m = 4)
+
+
+

Details

These functions are not intended to be called by the user.

+
+
-
- +
- - + + diff --git a/docs/reference/threshr-package.html b/docs/reference/threshr-package.html new file mode 100644 index 0000000..d94ce3f --- /dev/null +++ b/docs/reference/threshr-package.html @@ -0,0 +1,132 @@ + +threshr: Threshold Selection and Uncertainty for Extreme Value Analysis — threshr-package • threshr + + +
+
+ + + +
+
+ + +
+

Provides functions for the selection of extreme value threshold. +At the moment only the simplest case, where the data can be treated as +independent identically distributed observations, is considered. +Future releases will tackle more general situations. +See the 'threshr' website for more information, documentation +and examples.

+
+ + +
+

Details

+

The main function in the threshr package is ithresh, + which uses leave-one-out cross-validation in a Bayesian setup to compare + the predictive ability resulting from the use of each of a user-supplied + set of thresholds.

+

See vignette("threshr-vignette", package = "threshr") for an + overview of the package.

+
+
+

References

+

Northrop, P. J. (2017). revdbayes: Ratio-of-Uniforms Sampling + for Bayesian Extreme Value Analysis. R package version 1.2.1. + https://cran.r-project.org/package=revdbayes.

+

Northrop, P. J., Attalides, N. and Jonathan, P. (2017) + Cross-validatory extreme value threshold selection and uncertainty + with application to ocean storm severity. + Journal of the Royal Statistical Society Series C: Applied + Statistics, 66(1), 93-120. doi:10.1111/rssc.12159

+
+
+

See also

+

The packages revdbayes and + rust.

+

ithresh for threshold selection in the i.i.d. case + based on leave-one-out cross-validation.

+
+
+

Author

+

Maintainer: Paul J. Northrop p.northrop@ucl.ac.uk [copyright holder]

+

Authors:

  • Nicolas Attalides

  • +
+ +
+ +
+ + +
+ +
+

Site built with pkgdown 2.0.7.

+
+ +
+ + + + + + + + diff --git a/docs/sitemap.xml b/docs/sitemap.xml new file mode 100644 index 0000000..ba15014 --- /dev/null +++ b/docs/sitemap.xml @@ -0,0 +1,63 @@ + + + + /404.html + + + /articles/index.html + + + /articles/threshr-vignette.html + + + /authors.html + + + /index.html + + + /news/index.html + + + /reference/gom.html + + + /reference/index.html + + + /reference/ithresh.html + + + /reference/ns.html + + + /reference/plot.ithresh.html + + + /reference/plot.ithreshpred.html + + + /reference/plot.stability.html + + + /reference/predict.ithresh.html + + + /reference/print.ithresh.html + + + /reference/stability.html + + + /reference/summary.ithresh.html + + + /reference/threshr-internal.html + + + /reference/threshr-package.html + + + /reference/threshr.html + +