predict.hill: Predict the adaptive survival or quantile function
Description
Give the adaptive survival function or quantile function
Usage
# S3 method for hill
predict(object, newdata = NULL, type = "quantile",
input = NULL, threshold.rank = 0, threshold = 0, ...)
Arguments
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.
Value
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".
Details
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\).
# NOT RUN {x <- abs(rcauchy(100))
hh <- hill(x)
#example for a fixed value of thresholdpredict(hh, threshold = 3)
#example for a fixed rank value of thresholdpredict(hh, threshold.rank = 30)
# }