NNS.PDF: NNS PDF

Description Usage Arguments Value Author(s) References Examples

View source: R/Partial_Moments.R

Description

This function generates an empirical PDF using continuous CDFs from LPM.ratio.

Usage

1
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 observations.

bins

numeric; NULL (default) Selects number of observations as default bins.

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" http://amzn.com/1490523995

Examples

1
2
3
4
5
6
set.seed(123)
x <- rnorm(100)
NNS.PDF(x)

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

NNS documentation built on May 15, 2018, 5:04 p.m.