list_fevd: Fit EVD Parameters to a List of Annual Maxima

View source: R/loopFuns.R

list_fevdR Documentation

Fit EVD Parameters to a List of Annual Maxima

Description

Fits an extreme value distribution to each element of a list of annual maxima series, optionally using non-stationary covariates, and returns a table of fitted parameters.

Usage

list_fevd(
  lst,
  evd_mod_str,
  nsloc = NULL,
  outfile = NULL,
  pc_complete = 0.8,
  minyear = 1800,
  maxyear = 2100,
  mslAtt = "annMean"
)

Arguments

lst

A list of data.frames, each as returned by annual_max(), containing at least:

  • annMax: annual maximum values

  • annMean: annual mean values

  • datestr: timestamp strings for the maxima

  • date: POSIX timestamps for the maxima

  • pc_complete: completeness fraction per year

  • zero: the zero level

  • nsloc: optional covariate matrix used in non-stationary models.

If non-stationary fitting is required, each element may also include an nsloc matrix of covariates.

evd_mod_str

A character string specifying which fitting function from evd to use: "fgumbel", "fgumbelx" or "fgev".

nsloc

Optional matrix of covariates for non-stationary location modelling. Must have the same number of rows as years retained after filtering.

outfile

Optional character path to a NetCDF file in which to write the results (not currently implemented).

pc_complete

Numeric scalar (0-1). Minimum completeness fraction for a year to be included. Defaults to 0.8.

minyear

Numeric. Minimum calendar year to include. Defaults to 1800.

maxyear

Numeric. Maximum calendar year to include. Defaults to 2100.

mslAtt

character. Name of the attribute to be removed from annMax in each data.frame (e.g.\ "annMean" or "zero"). Defaults to "annMean".

Value

A data.frame with one row per list element, containing the parameters returned by evd_params() for each annual-max series.

Examples

dates = seq.Date(as.Date("1990-01-01"),as.Date("2019-12-31"), "day")
lst = lapply(1:10,function(x) loopevd::annual_max(data.frame(date = dates,
                  sea_level = stats::rnorm(length(dates),mean=x/10,sd = x),
                  zero = rep(0,length(dates)))))
loopevd::list_fevd(lst,"fgumbel",pc_complete=0)

loopevd documentation built on June 23, 2025, 5:09 p.m.