cdfpdq4: Cumulative Distribution Function of the Polynomial...

cdfpdq4R Documentation

Cumulative Distribution Function of the Polynomial Density-Quantile4 Distribution

Description

This function computes the cumulative probability or nonexceedance probability of the Polynomial Density-Quantile4 (PDQ4) distribution given parameters (\xi, \alpha, \kappa) computed by parpdq4. The cumulative distribution function has no explicit form and requires numerical methods. The R function uniroot() is used to root the quantile function quapdq4 to compute the nonexceedance probability. The distribution's canonical definition is in terms of the quantile function (quapdq4).

Usage

cdfpdq4(x, para, paracheck=TRUE)

Arguments

x

A real value vector.

para

The parameters from parpdq4 or vec2par.

paracheck

A logical switch as to whether the validity of the parameters should be checked. Default is paracheck=TRUE. This switch is made so that the root solution needed for cdfpdq4 shows an extreme speed increase because of the repeated calls to quapdq4.

Value

Nonexceedance probability (F) for x.

Author(s)

W.H. Asquith

References

Hosking, J.R.M., 2007, Distributions with maximum entropy subject to constraints on their L-moments or expected order statistics: Journal of Statistical Planning and Inference, v. 137, no. 9, pp. 2870–2891, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.jspi.2006.10.010")}.

See Also

pdfpdq4, quapdq4, lmompdq4, parpdq4, cdfpdq3

Examples

## Not run: 
  FF <- seq(0.001, 0.999, by=0.001)
  para  <- list(para=c(0, 0.4332, -0.7029), type="pdq4")
  Fpdq4 <- cdfpdq4(quapdq4(FF, para), para)
  plot(FF, Fpdq4, type="l", col=grey(0.8), lwd=4)
  # should be a 1:1 line, it is 
## End(Not run)

## Not run: 
  para <- list(para=c(0, 0.4332, -0.7029), type="pdq4")
  X <- seq(-5, +12, by=(12 - -5) / 500)
  plot( X, cdfpdq4(X, para), type="l", col=grey(0.8), lwd=4, ylim=c(0, 1))
  lines(X, pf( exp(X), df1=5, df2=4), lty=2)
  lines(X, c(NA, diff( cdfpdq4(X, para))          / ((12 - -5) / 500)))
  lines(X, c(NA, diff( pf( exp(X), df1=5, df2=4)) / ((12 - -5) / 500)), lty=2) # 
## End(Not run)

wasquith/lmomco documentation built on Nov. 13, 2024, 4:53 p.m.