predict.hill {extremefit} | R Documentation |
Give the adaptive survival function or quantile function
## S3 method for class 'hill' predict(object, newdata = NULL, type = "quantile", input = NULL, threshold.rank = 0, threshold = 0, ...)
object |
output object of the function hill. |
newdata |
optionally, a data frame or a vector with which to predict. If omitted, the original data points are used. |
type |
either "quantile" or "survival". |
input |
optionnaly, the name of the variable to estimate. |
threshold.rank |
the rank value for the hill output of the threshold, with default value 0. |
threshold |
the value of threshold, with default value 0. |
... |
further arguments passed to or from other methods. |
If type = "quantile", newdata must be between 0 and 1. If type = "survival", newdata must be in the domain of the data from the hill
function.
If newdata is a data frame, the variable from which to predict must be the first one or its name must start with a "p" if type = "quantile" and "x" if type = "survival".
The name of the variable from which to predict can also be written as input.
The function provide the quantile assiociated to the adaptive model for the probability grid (transformed to -log(1-p) in the output) if type = "quantile". And the survival function assiociated to the adaptive model for the quantile grid if type = "survival".
x <- abs(rcauchy(100)) hh <- hill(x) #example for a fixed value of threshold predict(hh, threshold = 3) #example for a fixed rank value of threshold predict(hh, threshold.rank = 30)