findthreshold {QRMlib}R Documentation

Find a Threshold

Description

find threshold (or threshold vector) corresponding to given number of upper order statistics

Usage

findthreshold(data, ne)

Arguments

data Data vector. See details section for extracting vector from other types.
ne vector giving number of excesses above the threshold

Details

If using matrix as data, pass matname[,n] to pass nth column.
If using a dataframe, pass dfname[[“colname”]] or dfname[[n]] or dfname$colname
or dfname[ , “colname”] or dfname[ ,n] where n is col number.
If using a timeSeries, pass “as.vector(tS@Data[,n])” to pass nth column of timeSeries data.
When tied data values exist, a threshold is found so that at least the specified number of extremes lies above threshold.

Value

vector of suitable thresholds corresponding to each of the number of excesses given in the ne vector

See Also

fit.GPD

Examples

#Load Danish data timeSeries file
data(danish);
targetVector <- as.vector(danish@Data);
# Find threshold giving (at least) fifty exceedances for Danish data 
findthreshold(targetVector,50);

[Package QRMlib version 1.4.4 Index]