# pdfpe3: Probability Density Function of the Pearson Type III...

Description Usage Arguments Value Author(s) References See Also Examples

### Description

This function computes the probability density of the Pearson Type III distribution given parameters (μ, σ, and γ) computed by parpe3. These parameters are equal to the product moments (pmoms): mean, standard deviation, and skew. The probability density function for γ \ne 0 is

f(x) = \frac{Y^{α -1} \exp({-Y/β})} {β^α\, Γ(α)} \mbox{,}

where f(x) is the probability density for quantile x, Γ is the complete gamma function in R as gamma, ξ is a location parameter, β is a scale parameter, α is a shape parameter, and Y = x - ξ for γ > 0 and Y = ξ - x for γ < 0. These three “new” parameters are related to the product moments (μ, mean; σ, standard deviation; γ, skew) by

α = 4/γ^2 \mbox{,}

β = \frac{1}{2}σ |γ| \mbox{,\ and}

ξ = μ - 2σ/γ \mbox{.}

If γ = 0, the distribution is symmetrical and simply is the probability density Normal distribution with mean and standard deviation of μ and σ, respectively. Internally, the γ = 0 condition is implemented by R function dnorm. The PearsonDS package supports the Pearson distribution system including the Type III (see Examples).

### Usage

 1 pdfpe3(x, para) 

### Arguments

 x A real value vector. para The parameters from parpe3 or vec2par.

### Value

Probability density (f) for x.

W.H. Asquith

### References

Hosking, J.R.M., 1990, L-moments—Analysis and estimation of distributions using linear combinations of order statistics: Journal of the Royal Statistical Society, Series B, v. 52, pp. 105–124.

Hosking, J.R.M., and Wallis, J.R., 1997, Regional frequency analysis—An approach based on L-moments: Cambridge University Press.

cdfpe3, quape3, lmompe3, parpe3

### Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43  lmr <- lmoms(c(123,34,4,654,37,78)) pe3 <- parpe3(lmr) x <- quape3(0.5,pe3) pdfpe3(x,pe3) ## Not run: # Demonstrate Pearson Type III between lmomco and PearsonDS qlmomco.pearsonIII <- function(f, para) { MU <- para$para[1] # product moment mean SIGMA <- para$para[2] # product moment standard deviation GAMMA <- para$para[3] # product moment skew L <- para$para[1] - 2*SIGMA/GAMMA # location S <- (1/2)*SIGMA*abs(GAMMA) # scale A <- 4/GAMMA^2 # shape return(PearsonDS::qpearsonIII(f, A, L, S)) # shape comes first! } FF <- nonexceeds(); para <- vec2par(c(6,.4,.7), type="pe3") plot( FF, qlmomco(FF, para), xlab="Probability", ylab="Quantile", cex=3) lines(FF, qlmomco.pearsonIII(FF, para), col=2, lwd=3) # ## End(Not run) ## Not run: # Demonstrate forced Pearson Type III parameter estimation via PearsonDS package para <- vec2par(c(3, 0.4, 0.6), type="pe3"); X <- rlmomco(105, para) lmrpar <- lmom2par(lmoms(X), type="pe3") mpspar <- mps2par(X, type="pe3"); mlepar <- mle2par(X, type="pe3") PDS <- PearsonDS:::pearsonIIIfitML(X) # force function exporting if(PDS$convergence != 0) { warning("convergence failed"); PDS <- NULL # if null, rerun simulation [new data] } else { # This is a list() mimic of PearsonDS::pearsonFitML() PDS <- list(type=3, shape=PDS$par[1], location=PDS$par[2], scale=PDS$par[3]) skew <- sign(PDS$shape) * sqrt(4/PDS$shape) stdev <- 2*PDS$scale / abs(skew); mu <- PDS$location + 2*stdev/skew PDS <- vec2par(c(mu,stdev,skew), type="pe3") # lmomco form of parameters } print(lmrpar$para); print(mpspar$para); print(mlepar$para); print(PDS$para) # mu sigma gamma # 2.9653380 0.3667651 0.5178592 # L-moments (by lmomco, of course) # 2.9678021 0.3858198 0.4238529 # MPS by lmomco # 2.9653357 0.3698575 0.4403525 # MLE by lmomco # 2.9653379 0.3698609 0.4405195 # MLE by PearsonDS # So we can see for this simulation that the two MLE approaches are similar. ## End(Not run) 

Search within the lmomco package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.