Learn R Programming

greybox (version 2.0.2)

hm: Half moment of a distribution and its derivatives.

Description

hm() function estimates half moment from some predefined constant C. ham() estimates the Half Absolute Moment. asymmetry() function returns Asymmetry coefficient, while extremity() returns the coefficient of Extremity, both based on hm(). Finally, cextremity() returns the Complex Extremity coefficient, based on hm().

Usage

hm(x, C = mean(x, na.rm = TRUE), ...)

ham(x, C = mean(x, na.rm = TRUE), ...)

asymmetry(x, C = mean(x, na.rm = TRUE), ...)

extremity(x, C = mean(x, na.rm = TRUE), ...)

cextremity(x, C = mean(x, na.rm = TRUE), ...)

Value

A complex variable is returned for the hm() and cextremity()

functions, and real values are returned for ham(), asymmetry() and extremity().

Arguments

x

A variable based on which HM is estimated.

C

Centring parameter.

...

Other parameters passed to mean function.

Author

Ivan Svetunkov, ivan@svetunkov.ru

Details

NA values of x are excluded on the first step of calculation.

References

  • Svetunkov I., Kourentzes N., Svetunkov S. "Half Central Moment for Data Analysis". Working Paper of Department of Management Science, Lancaster University, 2023:3, 1–21.

Examples

Run this code

x <- rnorm(100,0,1)
hm(x)
ham(x)
asymmetry(x)
extremity(x)
cextremity(x)

Run the code above in your browser using DataLab