NNS.PDF: NNS PDF

View source: R/Partial_Moments.R

NNS.PDFR Documentation

NNS PDF

Description

This function generates an empirical PDF using dy.dx on NNS.CDF.

Usage

NNS.PDF(variable, degree = 1, target = NULL, bins = NULL, plot = TRUE)

Arguments

variable

a numeric vector.

degree

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

target

a numeric range of values [a,b] where a < b. NULL (default) uses the variable min and max observations respectively.

bins

integer; NULL Selects number of bins. Bin width defaults to density(x)$bw.

plot

logical; plots PDF.

Value

Returns a data.table containing the intervals used and resulting PDF of the variable.

Author(s)

Fred Viole, OVVO Financial Systems

References

Viole, F. and Nawrocki, D. (2013) "Nonlinear Nonparametric Statistics: Using Partial Moments" https://www.amazon.com/dp/1490523995/ref=cm_sw_su_dp

Examples

## Not run: 
set.seed(123)
x <- rnorm(100)
NNS.PDF(x)

## Custom target range
NNS.PDF(x, target = c(-5, 5))

## End(Not run)

NNS documentation built on Dec. 2, 2022, 1:06 a.m.