Learn R Programming

NNS (version 11.5)

Co.LPM_nD: Co‑Lower Partial Moment nD

Description

This function generates an n‑dimensional co‑lower partial moment (n >= 2) for any degree or target.

Usage

Co.LPM_nD(data, target, degree = 0, norm = TRUE)

Value

Numeric; the n‑dimensional co‑lower partial moment.

Arguments

data

A numeric matrix with observations in rows and variables in columns.

target

A numeric vector, length equal to ncol(data).

degree

numeric; degree for lower deviations (0 = frequency, 1 = area).

norm

logical; if TRUE (default) normalize to the maximum observed value (→ [0,1]), otherwise return the raw moment.

Examples

Run this code
if (FALSE) {
mat <- matrix(rnorm(200), ncol = 4)
Co.LPM_nD(mat, rep(0, ncol(mat)), degree = 1, norm = FALSE)
}

Run the code above in your browser using DataLab