Learn R Programming

EnvStats (version 2.1.0)

pwMoment: Estimate Probability-Weighted Moments

Description

Estimate the $1jk$'th probability-weighted moment from a random sample, where either $j = 0$, $k = 0$, or both.

Usage

pwMoment(x, j = 0, k = 0, method = "unbiased", 
    plot.pos.cons = c(a = 0.35, b = 0), na.rm = FALSE)

Arguments

x
numeric vector of observations.
j, k
non-negative integers specifying the order of the moment.
method
character string specifying what method to use to compute the probability-weighted moment. The possible values are "unbiased" (method based on the U-statistic; the default), or "plotting.position" (method based on th
plot.pos.cons
numeric vector of length 2 specifying the constants used in the formula for the plotting positions when method="plotting.position". The default value is plot.pos.cons=c(a=0.35, b=0). If this vector has a names attribute
na.rm
logical scalar indicating whether to remove missing values from x. If na.rm=FALSE (the default) and x contains missing values, then a missing value (NA) is returned. If na.rm=TRUE,

Value

  • A numeric scalar--the value of the $1jk$'th probability-weighted moment as defined by Greenwood et al. (1979).

Details

The definition of a probability-weighted moment, introduced by Greenwood et al. (1979), is as follows. Let $X$ denote a random variable with cdf $F$, and let $x(p)$ denote the $p$'th quantile of the distribution. Then the $ijk$'th probability-weighted moment is given by: $$M(i, j, k) = E[X^i F^j (1 - F)^k] = \int^1_0 [x(F)]^i F^j (1 - F)^k \, dF$$ where $i$, $j$, and $k$ are real numbers. Note that if $i$ is a nonnegative integer, then $M(i, 0, 0)$ is the conventional $i$'th moment about the origin. Greenwood et al. (1979) state that in the special case where $i$, $j$, and $k$ are nonnegative integers: $$M(i, j, k) = B(j + 1, k + 1) E[X^i_{j+1, j+k+1}]$$ where $B(a, b)$ denotes the beta function evaluated at $a$ and $b$, and $$E[X^i_{j+1, j+k+1}]$$ denotes the $i$'th moment about the origin of the $(j + 1)$'th order statistic for a sample of size $(j + k + 1)$. In particular, $$M(1, 0, k) = \frac{1}{k+1} E[X_{1, k+1}]$$ $$M(1, j, 0) = \frac{1}{j+1} E[X_{j+1, j+1}]$$ where $$E[X_{1, k+1}]$$ denotes the expected value of the first order statistic (i.e., the minimum) in a sample of size $(k + 1)$, and $$E[X_{j+1, j+1}]$$ denotes the expected value of the $(j+1)$'th order statistic (i.e., the maximum) in a sample of size $(j+1)$. Unbiased Estimators (method="unbiased") Landwehr et al. (1979) show that, given a random sample of $n$ values from some arbitrary distribution, an unbiased, distribution-free, and parameter-free estimator of $M(1, 0, k)$ is given by: $$\hat{M}(1, 0, k) = \frac{1}{n} \sum^{n-k}_{i=1} x_{i,n} \frac{{n-i \choose k}}{{n-1 \choose k}}$$ where the quantity $x_{i,n}$ denotes the $i$'th order statistic in the random sample of size $n$. Hosking et al. (1985) note that this estimator is closely related to U-statistics (Hoeffding, 1948; Lehmann, 1975, pp. 362-371). Hosking et al. (1985) note that an unbiased, distribution-free, and parameter-free estimator of $M(1, j, 0)$ is given by: $$\hat{M}(1, j, 0) = \frac{1}{n} \sum^n_{i=j+1} x_{i,n} \frac{{i-1 \choose j}}{{n-1 \choose j}}$$ Plotting-Position Estimators (method="plotting.position") Hosking et al. (1985) propose alternative estimators of $M(1, 0, k)$ and $M(1, j, 0)$ based on plotting positions: $$\hat{M}(1, 0, k) = \frac{1}{n} \sum^n_{i=1} (1 - p_{i,n})^k x_{i,n}$$ $$\hat{M}(1, j, 0) = \frac{1}{n} \sum^n_{i=1} p_{i,n}^j x_{i,n}$$ where $$p_{i,n} = \hat{F}(x_{i,n})$$ denotes the plotting position of the $i$'th order statistic in the random sample of size $n$, that is, a distribution-free estimate of the cdf of $X$ evaluated at the $i$'th order statistic. Typically, plotting positions have the form: $$p_{i,n} = \frac{i-a}{n+b}$$ where $b > -a > -1$. For this form of plotting position, the plotting-position estimators are asymptotically equivalent to the U-statistic estimators.

References

Greenwood, J.A., J.M. Landwehr, N.C. Matalas, and J.R. Wallis. (1979). Probability Weighted Moments: Definition and Relation to Parameters of Several Distributions Expressible in Inverse Form. Water Resources Research 15(5), 1049--1054. Hoeffding, W. (1948). A Class of Statistics with Asymptotically Normal Distribution. Annals of Mathematical Statistics 19, 293--325. 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 52(1), 105--124. Hosking, J.R.M., and J.R. Wallis (1995). A Comparison of Unbiased and Plotting-Position Estimators of L Moments. Water Resources Research 31(8), 2019--2025. Hosking, J.R.M., J.R. Wallis, and E.F. Wood. (1985). Estimation of the Generalized Extreme-Value Distribution by the Method of Probability-Weighted Moments. Technometrics 27(3), 251--261. Landwehr, J.M., N.C. Matalas, and J.R. Wallis. (1979). Probability Weighted Moments Compared With Some Traditional Techniques in Estimating Gumbel Parameters and Quantiles. Water Resources Research 15(5), 1055--1064. Lehmann, E.L. (1975). Nonparametrics: Statistical Methods Based on Ranks. Holden-Day, Oakland, CA, pp.362-371.

See Also

eevd, egevd, lMoment.

Examples

Run this code
# Generate 20 observations from a generalized extreme value distribution 
  # with parameters location=10, scale=2, and shape=.25, then compute the 
  # 0'th, 1'st and 2'nd probability-weighted moments. 
  # (Note: the call to set.seed simply allows you to reproduce this example.)

  set.seed(250) 
  dat <- rgevd(20, location = 10, scale = 2, shape = 0.25) 

  pwMoment(dat) 
  #[1] 10.59556
 
  pwMoment(dat, 1) 
  #[1] 5.798481
  
  pwMoment(dat, 2) 
  #[1] 4.060574
  
  pwMoment(dat, k = 1) 
  #[1] 4.797081
 
  pwMoment(dat, k = 2) 
  #[1] 3.059173
 
  pwMoment(dat, 1, method = "plotting.position") 
  # [1] 5.852913
 
  pwMoment(dat, 1, method = "plotting.position", 
    plot.pos = c(.325, 1)) 
  #[1] 5.586817 

  #----------

  # Clean Up
  #---------
  rm(dat)

Run the code above in your browser using DataLab