allPairs | R Documentation |
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)
mtx |
Input matrix with variable names |
dig |
Digits of accuracy in reporting (=6, default) |
verbo |
Logical variable, set to 'TRUE' if printing is desired |
typ |
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). |
rnam |
Logical variable, default |
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.
The cause reported in the third column
is identified from the sign of the first SD1 only,
ignoring SD2, SD3 and SD4 under both Cr1 and Cr2. It is
a good idea to loop a call to this function with typ=1:3. One can print
the resulting 'outcause' matrix with the
xtable(outcause)
for the Latex output.
A similar deprecated function included in this package,
called some0Pairs
, incorporates all SD1 to SD4 and all
three criteria Cr1 rto Cr3 to report a ‘sum’ of indexes representing the signed
number whose sign can more comprehensively help determine the causal direction(s).
Since the Cr1 here is revised in later work, this is deprecated.
Prof. H. D. Vinod, Economics Dept., Fordham University, NY
Vinod, H. D.'Generalized Correlation and Kernel Causality with Applications in Development Economics' in Communications in Statistics -Simulation and Computation, 2015, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/03610918.2015.1122048")}
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
data(mtcars)
options(np.messages=FALSE)
for(j in 1:3){
a1=allPairs(mtcars[,1:3], typ=j)
print(a1)}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.