Learn R Programming

misty (version 0.5.0)

skewness: Skewness

Description

This function computes the skewness.

Usage

skewness(x, as.na = NULL, check = TRUE)

Value

Returns the estimated skewness of x.

Arguments

x

a numeric vector.

as.na

a numeric vector indicating user-defined missing values, i.e. these values are converted to NA before conducting the analysis.

check

logical: if TRUE, argument specification is checked.

Author

Takuya Yanagida takuya.yanagida@univie.ac.at

Details

The same method for estimating skewness is used in SAS and SPSS. Missing values (NA) are stripped before the computation. Note that at least 3 observations are needed to compute skewness.

References

Rasch, D., Kubinger, K. D., & Yanagida, T. (2011). Statistics in psychology - Using R and SPSS. New York: John Wiley & Sons.

See Also

kurtosis

Examples

Run this code
# Set seed of the random number generation
set.seed(123)
# Generate random numbers according to N(0, 1)
x <- rnorm(100)

# Compute skewness
skewness(x)

Run the code above in your browser using DataLab