Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gx.ngr.skew

Estimate the Skewness of a Data Vector


Description

Estimates the skew of a data vector for gx.ngr.stats to be used by gx.ngr.summary to output a NGR Table of summary statistics as a ‘.csv’ file.

Usage

gx.ngr.skew(xx)

Arguments

xx

vector for which the skewness is required.

Details

The formula used, (m3 / m2^1.5) * ((n-1)/n)^1.5, where m3 and m2 are the third and second moments about the mean, respectively, provides an estimate similar to that obtained by Minitab and BMDP.

Value

skew

the estimate of the skewness of the data vector passed to the function.

Note

Any less than detection limit values represented by negative values, or zeros or other numeric codes representing blanks in the data, must be removed prior to executing this function, see ltdl.fix.df.

Any NAs in the data vector will be removed prior to computation.

Author(s)

Robert G. Garrett

Examples

## Make test data available
data(sind)
attach(sind)

## Estimate and display the skewness of the Zn data 
skew <- gx.ngr.skew(Zn)
skew

## Alternately
skew <- gx.ngr.skew(rnorm(0,1,1000))
skew

## Detach test data
detach(sind)

rgr

Applied Geochemistry EDA

v1.1.15
GPL-2
Authors
Robert G. Garrett
Initial release
2018-03-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.