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

fun.moments.r

Calculate mean, variance, skewness and kurtosis of a numerical vector


Description

This function evaluates the mean, variance, skewness and kurtosis of a numerical vector. Missing values are automatically removed.

Usage

fun.moments.r(x, normalise = "N")

Arguments

x

A numeric vector

normalise

"Y" if you want kurtosis to be calculated with reference to kurtosis = 0 under Normal distribution. Default is "N".

Value

A vector of mean, variance, skewness and kurtosis.

Note

Please contact the author directly if you find a bug!

Author(s)

Steve Su

See Also

Examples

fun.moments.r(rnorm(1000))
fun.moments.r(rnorm(1000),normalise="Y")

GLDEX

Fitting Single and Mixture of Generalised Lambda Distributions (RS and FMKL) using Various Methods

v2.0.0.7
GPL (>= 3)
Authors
Steve Su, with contributions from: Diethelm Wuertz, Martin Maechler and Rmetrics core team members for low discrepancy algorithm, Juha Karvanen for L moments codes, Robert King for gld C codes and starship codes, Benjamin Dean for corrections and input in ks.gof code and R core team for histsu function.
Initial release
2020-02-04

We don't support your browser anymore

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