This studies all possible (perhaps too many) causal directions in a matrix.
It is deprecated because it uses older criterion 1 by caling abs_stdapd
I recommend using causeSummary
or its block version cuseSummBlk
.
This uses abs_stdres
, comp_portfo2
, etc. and returns
a matrix with 7 columns having detailed output. Criterion 1 has been revised
as described in Vinod (2019) and is known to work better.
allPairs(mtx, dig = 6, verbo = FALSE, typ = 1, rnam = FALSE)
Input matrix with variable names
Digits of accuracy in reporting (=6, default)
Logical variable, set to 'TRUE' if printing is desired
Causal direction criterion number (typ=1 is default) Criterion 1 (Cr1) compares kernel regression absolute values of gradients. Criterion 2 (Cr2) compares kernel regression absolute values of residuals. Criterion 3 (Cr3) compares kernel regression based r*(x|y) with r*(y|x).
Logical variable, default rnam=FALSE
means the user does
not want the row names to be
(somewhat too cleverly) assigned by the function.
A 7-column matrix called 'outcause' with names of variables X and Y in the first two columns and the name of the 'causal' variable in 3rd col. Remaining four columns report numerical computations of SD1 to SD4, r*(x|y), r*(y|x). Pearson r and p-values for its traditional significance testing.
Vinod, H. D.'Generalized Correlation and Kernel Causality with Applications in Development Economics' in Communications in Statistics -Simulation and Computation, 2015, https://doi.org/gffn86
Vinod, H. D. 'New exogeneity tests and causal paths,' Chapter 2 in 'Handbook of Statistics: Conceptual Econometrics Using R', Vol.32, co-editors: H. D. Vinod and C.R. Rao. New York: North Holland, Elsevier Science Publishers, 2019, pp. 33-64.
See Also somePairs
, some0Pairs
causeSummary
# NOT RUN {
data(mtcars)
options(np.messages=FALSE)
for(j in 1:3){
a1=allPairs(mtcars[,1:3], typ=j)
print(a1)}
# }
Run the code above in your browser using DataLab