Compute return levels (quantiles) from a distribution by inputting return periods. The return periods correspond to events that are exceedances of a quantile, not non-exceedances.
eval_return(distribution, at)enframe_return(..., at, arg_name = ".arg", fn_prefix = "return", sep = "_")
The evaluated representation in vector form (for eval_)
with length matching the length of at, and data frame
or tibble form (for enframe_) with number of rows matching the
length of at. The at input occupies the first column,
named .arg by default, or the specification in arg_name;
the evaluated representations for each distribution in ...
go in the subsequent columns (one column per distribution). For a
single distribution, this column is named according to the
representation by default (cdf, survival, quantile, etc.),
or the value in fn_prefix. For multiple distributions, unnamed
distributions are auto-named, and columns are named
<fn_prefix><sep><distribution_name> (e.g., cdf_distribution1).
A distribution, or possibly multiple
distributions in the case of ....
Vector of return periods >=1.
For enframe_, name of the column containing
the function arguments. Length 1 character vector.
For enframe_, name of the function to
appear in the column(s). Length 1 character vector.
When enframe'ing more than one distribution, the
character that will be separating the fn_name and the distribution name.
Length 1 character vector.
This function is simply the quantile
function evaluated at 1 - 1 / at.
Other distributional representations:
eval_cdf(),
eval_chf(),
eval_density(),
eval_hazard(),
eval_odds(),
eval_pmf(),
eval_quantile(),
eval_survival()
d <- dst_gp(24, 0.3)
eval_return(d, at = c(2, 25, 100, 200))
Run the code above in your browser using DataLab