somePairs2: Function reporting kernel causality results as a 7-column...

View source: R/somePairs2.R

somePairs2R Documentation

Function reporting kernel causality results as a 7-column matrix, version 2.

Description

This function is an alternative implementation of somePairs which also lets the user choose one of three criteria to determine causal direction by setting typ as 1, 2 or 3. This function reports results for only one criterion at a time unlike the function some0Pairs which summarizes the resulting causal directions for all criteria with suitable weights. If some variables are ‘control’ variables, use someCPairs, where notation C=control.

Usage

somePairs2(mtx, dig = 6, verbo = FALSE, typ = 1, rnam = FALSE)

Arguments

mtx

The data matrix in the first column is paired with all others.

dig

Number of digits for reporting (default dig=6).

verbo

Make verbo= TRUE for printing detailed steps.

typ

Must be 1 (default), 2 or 3 for the three criteria.

rnam

Make rnam= TRUE if cleverly created rownames are desired.

Details

(typ=1) reports ('Y', 'X', 'Cause', 'SD1.rhserr', 'SD2.rhserr', 'SD3.rhserr', 'SD4.rhserr') naming variables identifying the 'cause,' using Hausman-Wu criterion. It measures of stochastic dominance using absolute values of kernel regression abs(RHS first regressor*residual), comparing flipped regressions X on Y versus Y on X.

(typ=2) reports ('Y', 'X', 'Cause', 'SD1res', 'SD2res', 'SD3res', 'SD4res') and measures of stochastic dominance using absolute values of kernel regression residuals comparing regression of X on Y with that of Y on X.

(typ=3) reports ('Y', 'X', 'Cause', 'r*X|Y', 'r*Y|X', 'r', 'p-val') containing generalized correlation coefficients r*, 'r' refers to the Pearson correlation coefficient and p-val column has the p-values for testing the significance of Pearson's 'r'.

Value

A matrix containing causal identification results for one criterion. The first column of the input mtx having p columns is paired with (p-1) other columns The output matrix headings are self-explanatory and distinct for each criterion Cr1 to Cr3.

Author(s)

Prof. H. D. Vinod, Economics Dept., Fordham University, NY

References

H. D. Vinod '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")}

See Also

The related function some0Pairs may be more useful, since it reports on all three criteria (by choosing typ=1,2,3) and further summarizes their results by weighting to help choose causal paths.

Alternative and revised function somePairs2 implements the Cr1 (first criterion) with a direct estimate of the Hausman-Wu statistic for testing exogeneity.

Examples


## Not run: 
data(mtcars)
somePairs2(mtcars)

## End(Not run)


generalCorr documentation built on Oct. 10, 2023, 1:06 a.m.