colkurtosis: Column-wise kurtosis and skewness coefficients

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/colkurtosis.R

Description

Column-wise kurtosis and skewness coefficients.

Usage

1
2
3
colkurtosis(x, pvalue = FALSE)

colskewness(x, pvalue = FALSE)

Arguments

x

A matrix with the data, where the rows denote the samples and the columns are the variables.

pvalue

If you want a hypothesis test that the skewness or kurtosis are significant set this to TRUE. This checks whether the skewness is significantly different from 0 and whether the kurtosis is significantly different from 3.

Details

The skewness and kurtosis coefficients are calculated. For the skewness coefficient we use the sample unbiased version of the standard deviation. For the kurtosis, we do not subtract 3.

Value

If "pvalue" is FALSE, a vector with the relevant coefficient. Otherwise a matrix with two columns. The kurtosis or skewness coefficient and the p-value from the hypothesis test that they are significantly different from 3 or 0 respectively.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.

See Also

skew, skew.test2, colMedians, colmeans, colVars, sftests

Examples

1
2
3
4
5
6
## 200 variables, hence 200 F-tests will be performed
x = matrix( rnorm(200 * 50), ncol = 50 )
## 200 observations in total
system.time( colkurtosis(x) )
system.time( colskewness(x) )
x <- NULL

Example output

Loading required package: Rcpp
Loading required package: RcppZiggurat
   user  system elapsed 
  0.001   0.000   0.004 
   user  system elapsed 
  0.001   0.000   0.001 

Rfast documentation built on May 18, 2021, 1:07 a.m.