contCDF | R Documentation |
MultiQR
objectThis function generats a smooth, continuous CDF a given row of a MultiQR
object. Interpolation if performed between quantiles and a range of tail models
are available for extrapolating beyond beyond the last estimated upper and lower
quantile.
contCDF(
quantiles,
kfold = NULL,
inverse = F,
method = list(name = "spline", splinemethod = "monoH.FC"),
tails = list(method = "extrapolate", L = 0, U = 1),
...
)
quantiles |
A single-row |
method |
Method of interpolation. See details. |
tails |
Definition of tails. See details. |
... |
extra arguments to |
kfolds |
Fold/test label corresponding to |
Interpolation between quantiles may be linear of via smooth splines:
Linear interpolation: method="linear"
linear interpolation
between quantiles.
Spline interpolation: method=list(name=spline,splinemethod=monoH.FC)
, where spline method is
passed to splinefun
. splinefun=monoH.FC
is recommended to guarantee monotonically
increasing function.
Several options are available for specifying distribution tails beyond the final upper and lower quantiles:
Linear extrapolation: tails=list(method="extrapolate",L,U)
value set to L
and U
for probability levels 0 and 1, respectively. If method="extrapolate_dtail1"
then
tails are extrapolated to the 50th quantile plus (minus) U
(L
).
Exponential tails: tails=list(method="exponential",thicknessPL,thicknessPR,ntailpoints=5)
the user will either supply user defined thickness parameters for the tail
via thicknessPL
and thicknessPR
. The number
of tail quantiles to be estimated is set by ntailpoints
, which defaults to 5.
Alternatively tails=list(method="exponential",thickparamFunc)
where thickparamFunc
is a function that takes the q50 as an input and returns the thickness parameter. If method="extrapolate_dtail2"
then
tails are extrapolated to the highest quantile in quantiles
plus U
and the lowest quantile in quantiles
plus (L
). Note that for both alternative options, U
should be positive and L
should be negative.
Dynamic exponential tails: tails=list(method="dyn_exponential",ntailpoints=5)
, where the tail shape
is conditional on the values for the upper and lower quantile of qrdata
. This method
currently only supports an input variable scale of [0,1]
. The tail shape moves from linear interpolation
when the upper/lower quantile is near the boundary for each respective tail, to a conditional exponential shape.
Generalised Pareto Distribution Tails: tails="gpd", scale_r,shape_r,
scale_l,shape_l,tail_qs=seq(0.1,2,by=0.1)
with left (_l) and right (_r) scale and shape parameters.
Quantiles are calculated at points defined by the upper (lower) quantile plus (minus)
tail_qs
.
A cumulative density function of the type produced by splinefun
or
approxfun
.
Jethro Browell, jethro.browell@strath.ac.uk; Ciaran Gilbert, ciaran.gilbert@strath.ac.uk
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.