Learn R Programming

texmex (version 2.4.9)

plot.lp.evmOpt: Predict return levels from extreme value models, or obtain the linear predictors.

Description

Predict return levels from extreme value models, or obtain the linear predictors.

Usage

# S3 method for lp.evmOpt
plot(
  x,
  main = NULL,
  pch = 1,
  ptcol = 2,
  cex = 0.75,
  linecol = 4,
  cicol = 1,
  polycol = 15,
  plot. = TRUE,
  ...
)

# S3 method for evmOpt predict( object, M = 1000, newdata = NULL, type = "return level", se.fit = FALSE, ci.fit = FALSE, alpha = 0.05, unique. = TRUE, ... )

# S3 method for evmOpt linearPredictors( object, newdata = NULL, se.fit = FALSE, ci.fit = FALSE, alpha = 0.05, unique. = TRUE, full.cov = FALSE, ... )

linearPredictors( object, newdata = NULL, se.fit = FALSE, ci.fit = FALSE, alpha = 0.05, unique. = TRUE, ... )

# S3 method for evmSim predict( object, M = 1000, newdata = NULL, type = "return level", se.fit = FALSE, ci.fit = FALSE, alpha = 0.05, unique. = TRUE, all = FALSE, sumfun = NULL, ... )

# S3 method for evmSim linearPredictors( object, newdata = NULL, se.fit = FALSE, ci.fit = FALSE, alpha = 0.05, unique. = TRUE, all = FALSE, sumfun = NULL, ... )

# S3 method for evmBoot predict( object, M = 1000, newdata = NULL, type = "return level", se.fit = FALSE, ci.fit = FALSE, alpha = 0.05, unique. = TRUE, all = FALSE, sumfun = NULL, ... )

# S3 method for evmBoot linearPredictors( object, newdata = NULL, se.fit = FALSE, ci.fit = FALSE, alpha = 0.05, unique. = TRUE, all = FALSE, sumfun = NULL, ... )

# S3 method for lp.evmOpt print(x, digits = 3, ...)

Value

A list with two entries: the first being the call and the second being a further list with one entry for each value of M.

Arguments

x

An object of class lp.evmOpt, lp.evmSim or lp.evmBoot, to be passed to methods for these classes.

main, pch, ptcol, cex, linecol, cicol, polycol, plot, plot.

Further arguments to plot methods.

...

Further arguments to methods.

object

An object of class evmOpt, evmSim or evmBoot.

M

The return period: units are number of observations. Defaults to M = 1000. If a vector is passed, a list is returned, with items corresponding to the different values of the vector M.

newdata

The new data that you want to make the prediction for. Defaults in newdata = NULL in which case the data used in fitting the model will be used. Column names must match those of the original data matrix used for model fitting.

type

For the predict methods, the type of prediction, either "return level" (or "rl") or "link" (or "lp"). Defaults to type = "return level". When a return level is wanted, the user can specify the associated return period via the M argument. If type = "link" the linear predictor(s) for phi and xi (or whatever other parameters are in your texmexFamily are returned.

For the plot methods for simulation based estimation of underlying distributions i.e. objects derived from "evmSim" and "evmBoot" classes, whether to use the sample median type="median" or mean type="mean" estimate of the parameter.

se.fit

Whether or not to return the standard error of the predicted value. Defaults to se.fit = FALSE and is not implemented for predict.evmSim or predict.evmBoot.

ci.fit

Whether or not to return a confidence interval for the predicted value. Defaults to ci.fit = FALSE. For objects of class evmOpt, if set to TRUE then the confidence interval is a simple symmetric confidence interval based on the estimated approximate standard error. For the evmSim and evmBoot methods, the confidence interval represents quantiles of the simulated distribution of the parameters.

alpha

If ci.fit = TRUE, a 100(1 - alpha)% confidence interval is returned. Defaults to alpha = 0.050.

unique.

If unique. = TRUE, predictions for only the unique values of the linear predictors are returned, rather than for every row of newdata. Defaults to unique. = TRUE.

full.cov

Should the full covariance matrix be returned as part of a list object. This is used internally and not intended for direct use. Defaults to full.cov = FALSE

all

For the evmSim and evmBoot methods, if all = TRUE, the predictions are returned for every simulated parameter vector. Otherwise, only a summary of the posterior/bootstrap distribution is returned. Defaults to all = FALSE.

sumfun

For the evmSim and evmBoot methods, a summary function can be passed in. If sumfun = FALSE, the default, the summary function used returns the estimated mean and median, and quantiles implied by alpha.

digits

Number of digits to show when printing objects.

Author

Harry Southworth and Janet E. Heffernan

Details

By default, return levels predicted from the unique values of the linear predictors are returned. For the evmBoot method, estimates of confidence intervals are simply quantiles of the bootstrap sample. The evmBoot method is just a wrapper for the evmSim method.