Learn R Programming

lmomco (version 2.4.14)

dat2bernquaf: Equivalent Nonexceedance Probability for a Given Value through Observed Data to Empirical Quantiles through Bernstein or Kantorovich Polynomials

Description

This function computes an equivalent nonexceedance probability \(F\) of a single value \(x\) for the sample data set (\(\hat{X}\)) through inversion of the empricial quantile function as computable through Bernstein or Kantorovich Polynomials by the dat2bernqua function.

Usage

dat2bernquaf(x, data, interval=NA, ...)

Value

An R

list is returned.

x

An echoing of the \(x\) value via the x argument.

f

The equivalent nonexceedance probability \(F(x{\mid}\hat{X})\).

interval

The search interval of \(F\) used.

afunc.root

Corresponds to the f.root element returned by the uniroot() function.

iter

Corresponds to the iter element returned by the uniroot() function.

estim.prec

Corresponds to the estim.prec element returned by the uniroot() function.

source

An attribute identifying the computational source: “dat2bernquaf”.

Arguments

x

A scalar value for which the equivalent nonexceedance probability \(F\) through the function dat2bernqua is to be computed.

data

A vector of data values that directly correspond to the argument x in the function dat2bernqua.

interval

The search interval. If NA, then \([1/(n+1), 1 - 1/(n+1)]\) is used. If interval is a single value \(a\), then the interval is computed as \([a, 1 - a]\).

...

Additional arguments passed to dat2bernqua through the uniroot() function in R.

Author

W.H. Asquith

Details

The basic logic is thus. The \(\hat{X}\) in conjunction with the settings for the polynomials provides the empirical quantile function (EQF). The dat2bernquaf function then takes the EQF (through dynamic recomputation) and seeks a root for the single value also given.

The critical piece likely is the search interval, which can be modified by the interval argument if the internal defaults are not sufficient. The default interval is determined as the first and last Weibull plotting positions of \(\hat{X}\) having a sample size \(n\): \([1/(n+1), 1 - 1/(n+1)]\). Because the dat2bernqua function has a substantial set of options that control how the empirical curve is (might be) extrapolated beyond the range of \(\hat{X}\), it is difficult to determine an always suitable interval for the rooting. However, it should be considered obvious that the result is more of an interpolation if \(F(x)\) is within \(F \in [1/(n+1), 1 - 1/(n+1)]\) and increasingly becomes an accurate interpolation as \(F(x) \rightarrow 1/2\) (the median).

If the value \(x\) is too far beyond the data or if the search interval is not sufficient then the following error will be triggered:


Error in uniroot(afunc, interval, ...) :
  f() values at end points not of opposite sign

The Examples section explores this aspect.

See Also

dat2bernqua