Learn R Programming

rgr (version 1.1.15)

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.

Value

skew

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

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.

Examples

Run this code
# NOT RUN {
## 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)
# }

Run the code above in your browser using DataLab