View source: R/fitdiagnostics.R
ci.rl.ns.fevd.bayesian | R Documentation |
Calculates credible intervals based on the upper and lower alpha/2 quantiles of the MCMC sample for effective return levels from a non-stationary EVD fit using Bayesian estimation, or find normal approximation confidence intervals if estimation method is MLE.
## S3 method for class 'rl.ns.fevd.bayesian'
ci(x, alpha = 0.05, return.period = 100, FUN = "mean",
burn.in = 499, ..., qcov = NULL, qcov.base = NULL,
verbose = FALSE)
## S3 method for class 'rl.ns.fevd.mle'
ci(x, alpha = 0.05, return.period = 100, method =
c("normal"), verbose = FALSE, qcov = NULL, qcov.base =
NULL, ...)
x |
An object of class “fevd”. |
alpha |
Confidence level (numeric). |
return.period |
numeric giving the desired return period. Must have length one! |
FUN |
character string naming the function to use to calculate the estimated return levels from the posterior sample (default takes the posterior mean). |
burn.in |
The first |
method |
Currently only “normal” method is implemented. |
verbose |
logical, should progress information be printed to the screen? Currently not used by the MLE method. |
... |
Not used. |
qcov , qcov.base |
Matrix giving specific covariate values. |
Return levels are calculated for all coavariates supplied by qcov
(and, if desired, qcov.base
) for all values of the posterior sample (less the burn.in
), or for all values of the original covariates used for the fit (if qcov
and qcov.base
are NULL). The estimates aree taken from the sample according to FUN
and credible intervals are returned according to alpha
.
A three-column matrix is returned with the estimated effective return levels in the middle and lower and upper to the left and right.
Eric Gilleland
make.qcov
, fevd
, ci.fevd
, return.level
data(Fort)
fit <- fevd(Prec, threshold = 2, data = Fort,
location.fun = ~cos(2 * pi * day /365.25),
type = "PP", verbose = TRUE)
v <- make.qcov(fit, vals=list(mu1 = c(cos(2 * pi * 1 /365.25),
cos(2 * pi * 120 /365.25), cos(2 * pi * 360 /365.25))))
ci(fit, return.period = 100, qcov = v)
## Not run:
fit <- fevd(Prec, threshold = 2, data = Fort,
location.fun = ~cos(2 * day /365.25),
type = "PP", method = "Bayesian", verbose = TRUE)
ci(fit, return.period = 100, qcov = v)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.