View source: R/Partial_Moments.R
| NNS.CDF | R Documentation |
This function generates an empirical CDF using partial moment ratios LPM.ratio, and resulting survival, hazard and cumulative hazard functions.
NNS.CDF(variable, degree = 0, target = NULL, type = "CDF", plot = TRUE)
variable |
a numeric vector or data.frame of >= 2 variables for joint CDF. |
degree |
numeric; |
target |
numeric; |
type |
options("CDF", "survival", "hazard", "cumulative hazard"); |
plot |
logical; plots CDF. |
Returns:
"Function" a data.frame (class NNS.data.frame) containing the observations and the resulting function of the variable.
"target.value" value from the target argument.
Fred Viole, OVVO Financial Systems
Viole, F. and Nawrocki, D. (2013) "Nonlinear Nonparametric Statistics: Using Partial Moments" (ISBN: 1490523995, 2nd edition: https://ovvo-financial.github.io/NNS/book/)
Viole, F. (2017) "Continuous CDFs and ANOVA with NNS" \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2139/ssrn.3007373")}
## Not run:
set.seed(123)
x <- rnorm(100)
NNS.CDF(x)
## Empirical CDF (degree = 0)
NNS.CDF(x)
## Area-weighted CDF (degree = 1): the share of deviation area below each point
NNS.CDF(x, 1)
## Joint CDF
x <- rnorm(5000) ; y <- rnorm(5000)
A <- cbind(x,y)
NNS.CDF(A, 0)
## Joint CDF with target
NNS.CDF(A, 0, target = rep(0, ncol(A)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.