NNS.caus {NNS} | R Documentation |
NNS Causation
Description
Returns the causality from observational data between two variables.
Usage
NNS.caus(x, y = NULL, factor.2.dummy = FALSE, tau = 0, plot = FALSE)
Arguments
x |
a numeric vector, matrix or data frame. |
y |
|
factor.2.dummy |
logical; |
tau |
options: ("cs", "ts", integer); 0 (default) Number of lagged observations to consider (for time series data). Otherwise, set |
plot |
logical; |
Value
Returns the directional causation (x —> y) or (y —> x) and net quantity of association. For causal matrix, directional causation is returned as ([column variable] —> [row variable]). Negative numbers represent causal direction attributed to [row 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:
## x causes y...
set.seed(123)
x <- rnorm(1000) ; y <- x ^ 2
NNS.caus(x, y, tau = "cs")
## Causal matrix without per factor causation
NNS.caus(iris, tau = 0)
## Causal matrix with per factor causation
NNS.caus(iris, factor.2.dummy = TRUE, tau = 0)
## End(Not run)