Last chance! 50% off unlimited learning
Sale ends in
Compute the sample coefficient of skewness.
skewness(x, na.rm = FALSE, method = "fisher", l.moment.method = "unbiased",
plot.pos.cons = c(a = 0.35, b = 0))
numeric vector of observations.
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
,
missing values are removed from x
prior to computing the coefficient
of variation.
character string specifying what method to use to compute the sample coefficient
of skewness. The possible values are
"fisher"
(ratio of unbiased moment estimators; the default),
"moments"
(ratio of product moment estimators), or
"l.moments"
(ratio of
character string specifying what method to use to compute the
method="l.moments"
. The possible values are
"ubiased"
(method based on the "plotting.position"
(method based on the plotting position formula).
numeric vector of length 2 specifying the constants used in the formula for
the plotting positions when method="l.moments"
and
l.moment.method="plotting.position"
. The default value is
plot.pos.cons=c(a=0.35, b=0)
. If this vector has a names attribute
with the value c("a","b")
or c("b","a")
, then the elements will
be matched by name in the formula for computing the plotting positions.
Otherwise, the first element is mapped to the name "a"
and the second
element to the name "b"
.
A numeric scalar -- the sample coefficient of skewness.
Let
Product Moment Coefficient of Skewness (method="moment"
or method="fisher"
)
The coefficient of skewness of a distribution is the third
standardized moment about the mean:
When method="moment"
, the coefficient of skewness is estimated using the
method of moments estimator for the third central moment and and the method of
moments estimator for the variance:
This form of estimation should be used when resampling (bootstrap or jackknife).
When method="fisher"
, the coefficient of skewness is estimated using the
unbiased estimator for the third central moment
(Serfling, 1980, p.73; Chen, 1995, p.769) and the unbiased estimator for the
variance.
L-Moment Coefficient of skewness (method="l.moments"
)
Hosking (1990) defines the
When l.moment.method="unbiased"
, the
When l.moment.method="plotting.position"
, the
See the help file for lMoment
for more information on
estimating
Berthouex, P.M., and L.C. Brown. (2002). Statistics for Environmental Engineers, Second Edition. Lewis Publishers, Boca Raton, FL.
Chen, L. (1995). Testing the Mean of Skewed Distributions. Journal of the American Statistical Association 90(430), 767--772.
Helsel, D.R., and R.M. Hirsch. (1992). Statistical Methods in Water Resources Research. Elsevier, New York, NY.
Ott, W.R. (1995). Environmental Statistics and Data Analysis. Lewis Publishers, Boca Raton, FL.
Serfling, R.J. (1980). Approximation Theorems of Mathematical Statistics. John Wiley and Sons, New York, p.73.
Taylor, J.K. (1990). Statistical Techniques for Data Analysis. Lewis Publishers, Boca Raton, FL.
Vogel, R.M., and N.M. Fennessey. (1993).
Zar, J.H. (2010). Biostatistical Analysis. Fifth Edition. Prentice-Hall, Upper Saddle River, NJ.
var
, sd
, cv
,
kurtosis
, summaryFull
,
Summary Statistics.
# NOT RUN {
# Generate 20 observations from a lognormal distribution with parameters
# mean=10 and cv=1, and estimate the coefficient of skewness.
# (Note: the call to set.seed simply allows you to reproduce this example.)
set.seed(250)
dat <- rlnormAlt(20, mean = 10, cv = 1)
skewness(dat)
#[1] 0.9876632
skewness(dat, method = "moment")
#[1] 0.9119889
skewness(dat, meth = "l.moment")
#[1] 0.2656674
#----------
# Clean up
rm(dat)
# }
Run the code above in your browser using DataLab