predict.gpd: Predict return levels from Generalized Pareto Distribution...

Description Usage Arguments Details Value Note Author(s)

Description

Predict return levels from Generalized Pareto Distribution models, or obtain the linear predictors.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
## S3 method for class 'gpd'
predict(object, M = 1000, newdata = NULL, type = "return level", se.fit = FALSE, 
ci.fit = FALSE, alpha = 0.05, unique. = TRUE,...)

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

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


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

## S3 method for class 'gpd'
linearPredictors(object, newdata = NULL, se.fit = FALSE, ci.fit = FALSE, 
alpha = 0.05, unique. = TRUE, full.cov = FALSE,...)
## S3 method for class 'bgpd'
linearPredictors(object, newdata = NULL, se.fit = FALSE, ci.fit = FALSE, 
alpha = 0.050, unique. = TRUE, all = FALSE, sumfun = NULL,...)
## S3 method for class 'bootgpd'
linearPredictors(object, newdata = NULL, se.fit = FALSE, ci.fit = FALSE, alpha = 0.050, unique. = TRUE, all = FALSE, sumfun = NULL,...)

## S3 method for class 'lp.gpd'
print(x, digits=3,...)
## S3 method for class 'lp.bgpd'
print(x, digits=3,...)
## S3 method for class 'lp.bootgpd'
print(x, digits=3,...)

## S3 method for class 'lp.gpd'
summary(object, digits=3,...)
## S3 method for class 'lp.bgpd'
summary(object, digits=3,...)
## S3 method for class 'lp.bootgpd'
summary(object, digits=3,...)

## S3 method for class 'lp.gpd'
plot(x, main=NULL, pch=1, ptcol=2, cex=.75, linecol=4, cicol=1, polycol=15,...)
## S3 method for class 'lp.bgpd'
plot(x, type="median", ...)
## S3 method for class 'lp.bootgpd'
plot(x, type="median", ...)

Arguments

object

An object of class gpd, bgpd or bootgpd.

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 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 perdiod via the M argument. If type = ``link'' the linear predictor(s) for phi and xi are returned.

For the plot methods for simulation based estimation of underlying distributions i.e. objects derived from bgpd and bootgpd 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.bgpd or predict.bootgpd.

ci.fit

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

M

The return level: 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.

alpha

If ci.fit = TRUE, a (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.

all

For the bgpd and bootgpd 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.

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

sumfun

For the bgpd and bootgpd 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.

x

An object of class lp.gpd, lp.bgpd or lp.bootgpd, to be passed to methods for these classes.

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

Further arguments to plot methods.

digits

Number of digits to show when printing objects.

...

Further arguments to methods.

Details

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

Value

A list with one entry for each value of M.

Note

At present, the confidence intervals returned for an object of class gpd are simple confidence intervals based on assumptions of normality that are likely to be far from the truth in many cases. A better approach would be to use profile likelihood, and we intend to implement this method at a future date. Alternatively, the credible intervals returned by using Bayesian estimation and the predict method for class "bgpd" will tend to give a better representation of the asymmetry of the estimated intervals around the parameter point estimates.

Author(s)

Harry Southworth and Janet E. Heffernan


texmex documentation built on May 2, 2019, 4:56 p.m.