Learn R Programming

NNS (version 11.4)

LPM: Lower Partial Moment

Description

This function generates a univariate lower partial moment for any degree or target.

Usage

LPM(degree, target, variable, excess_ret = FALSE)

Value

LPM of variable

Arguments

degree

integer; (degree = 0) is frequency, (degree = 1) is area.

target

numeric; Set to target = mean(variable) for classical equivalences, but does not have to be. (Vectorized)

variable

a numeric vector. data.frame or list type objects are not permissible.

excess_ret

Logical; FALSE (default)

Author

Fred Viole, OVVO Financial Systems

References

Viole, F. and Nawrocki, D. (2013) "Nonlinear Nonparametric Statistics: Using Partial Moments" (ISBN: 1490523995)

Examples

Run this code
set.seed(123)
x <- rnorm(100)
LPM(0, mean(x), x)

Run the code above in your browser using DataLab