findthreshold {QRMlib} | R Documentation |
find threshold (or threshold vector) corresponding to given number of upper order statistics
findthreshold(data, ne)
data |
Data vector. See details section for extracting vector from other types. |
ne |
vector giving number of excesses above the threshold |
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.
vector of suitable thresholds corresponding to each of the number of excesses given in the ne vector
#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);