generalCorr1.2.6 package

Generalized Correlations, Causal Paths and Portfolio Selection

bootDom12

bootstrap confidence intervals for (x2-x1) exact SD1 to SD4 stochastic...

bootGcLC

Compute vector of n999 nonlinear Granger causality paths

bootGcRsq

Compute vector of n999 nonlinear Granger causality paths

bootPair2

Compute matrix of n999 rows and p-1 columns of bootstrap `sum' (scores...

bootPairs

Compute matrix of n999 rows and p-1 columns of bootstrap `sum' (streng...

bootPairs0

Compute matrix of n999 rows and p-1 columns of bootstrap `sum' index (...

bootQuantile

Compute confidence intervals [quantile(s)] of indexes from bootPairs o...

bootSign

Probability of unambiguously correct (+ or -) sign from bootPairs outp...

bootSignPcent

Probability of unambiguously correct (+ or -) sign from bootPairs outp...

rank2sell

Compute the portfolio return knowing the rank of a stock in the input ...

abs_res

Absolute residuals of kernel regression of x on y.

abs_stdapd

Absolute values of gradients (apd's) of kernel regressions of x on y w...

abs_stdapdC

Absolute values of gradients (apd's) of kernel regressions of x on y w...

abs_stdres

Absolute values of residuals of kernel regressions of x on y when both...

abs_stdresC

Absolute values of residuals of kernel regressions of x on y when both...

abs_stdrhserC

Absolute residuals kernel regressions of standardized x on y and contr...

abs_stdrhserr

Absolute values of Hausman-Wu null in kernel regressions of x on y whe...

absBstdres

Block version of abs-stdres Absolute values of residuals of kernel reg...

absBstdresC

Block version of Absolute values of residuals of kernel regressions of...

absBstdrhserC

Block version abs_stdrhser Absolute residuals kernel regressions of st...

allPairs

Report causal identification for all pairs of variables in a matrix (d...

bigfp

Compute the numerical integration by the trapezoidal rule.

bootSummary

Compute usual summary stats of 'sum' indexes from bootPairs output

bootSummary2

Compute usual summary stats of 'sum' index in (-100, 100) from bootPai...

canonRho

Generalized canonical correlation, estimating alpha, beta, rho.

causeAllPair

All Pair Version Kernel (block) causality summary paths from three cri...

causeSum2Blk

Block Version 2: Kernel causality summary of causal paths from three c...

causeSum2Panel

Kernel regressions based causal paths in Panel Data.

causeSummary

Kernel causality summary of evidence for causal paths from three crite...

causeSummary0

Older Kernel causality summary of evidence for causal paths from three...

causeSummary2

Kernel causality summary of evidence for causal paths from three crite...

causeSummary2NoP

No Print version Kernel causality summary of evidence for causal paths...

causeSummBlk

Block Version 2: Kernel causality summary of causal paths from three c...

causeSumNoP

No print (NoP) version of causeSummBlk summary causal paths from three...

cofactor

Compute cofactor of a matrix based on row r and column c.

comp_portfo2

Compares two vectors (portfolios) using stochastic dominance of orders...

compPortfo

Compares two vectors (portfolios) using momentVote, DecileVote and exa...

decileVote

Function compares nine deciles of stock return distributions.

depMeas

depMeas Signed measure of nonlinear nonparametric dependence between t...

dif4

order 4 differencing of a time series vector

dif4mtx

order four differencing of a matrix of time series

exactSdMtx

Exact stochastic dominance computation from areas above ECDF pillars.

GcRsqX12

Generalized Granger-Causality. If dif>0, x2 Granger-causes x1.

GcRsqX12c

Generalized Granger-Causality. If dif>0, x2 Granger-causes x1.

GcRsqYX

Nonlinear Granger causality between two time series workhorse function...

GcRsqYXc

Nonlinear Granger causality between two time series workhorse function...

generalCorrInfo

generalCorr package description:

get0outliers

Function to compute outliers and their count using Tukey's method usin...

getSeq

Two sequences: starting+ending values from n and blocksize (internal u...

gmcmtx0

Matrix R* of generalized correlation coefficients captures nonlinearit...

gmcmtxBlk

Matrix R* of generalized correlation coefficients captures nonlinearit...

gmcmtxZ

compute the matrix R* of generalized correlation coefficients.

gmcxy_np

Function to compute generalized correlation coefficients r*(x|y) and r...

heurist

Heuristic t test of the difference between two generalized correlation...

ibad

internal object

ii

internal ii

kern

Kernel regression with options for residuals and gradients.

kern_ctrl

Kernel regression with control variables and optional residuals and gr...

kern2

Kernel regression version 2 with optional residuals and gradients with...

kern2ctrl

Kernel regression with control variables and optional residuals and gr...

mag

Approximate overall magnitudes of kernel regression partials dx/dy and...

mag_ctrl

After removing control variables, magnitude of effect of x on y, and o...

minor

Function to do compute the minor of a matrix defined by row r and colu...

momentVote

Function compares Pearson Stats and Sharpe Ratio for a matrix of stock...

napair

Function to do pairwise deletion of missing rows.

naTriple

Function to do matched deletion of missing rows from x, y and z variab...

naTriplet

Function to do matched deletion of missing rows from x, y and control ...

NLhat

Compute fitted values from kernel regression of x on y and y on x

outOFsamp

Compare out-of-sample portfolio choice algorithms by a leave-percent-o...

outOFsell

Compare out-of-sample (short) selling algorithms by a leave-percent-ou...

Panel2Lag

Function to compute a vector of 2 lagged values of a variable from pan...

PanelLag

Function for computing a vector of one-lagged values of xj, a variable...

parcor_ijk

Generalized partial correlation coefficients between Xi and Xj, after ...

parcor_ijkOLD

Generalized partial correlation coefficient between Xi and Xj after re...

parcor_linear

Partial correlation coefficient between Xi and Xj after removing the l...

parcor_ridg

Compute generalized (ridge-adjusted) partial correlation coefficients ...

parcorBijk

Block version of generalized partial correlation coefficients between ...

parcorBMany

Block version reports many generalized partial correlation coefficient...

parcorHijk

Generalized partial correlation coefficients between Xi and Xj, after ...

parcorHijk2

Generalized partial correlation coefficients between Xi and Xj,

parcorMany

Report many generalized partial correlation coefficients allowing cont...

parcorMtx

Matrix of generalized partial correlation coefficients, always leaving...

parcorSilent

Silently compute generalized (ridge-adjusted) partial correlation coef...

parcorVec

Vector of generalized partial correlation coefficients (GPCC), always ...

parcorVecH

Vector of hybrid generalized partial correlation coefficients.

parcorVecH2

Vector of hybrid generalized partial correlation coefficients.

pcause

Compute the bootstrap probability of correct causal direction.

pillar3D

Create a 3D pillar chart to display (x, y, z) data coordinate surface.

prelec2

Intermediate weighting function giving Non-Expected Utility theory wei...

probSign

Compute probability of positive or negative sign from bootPairs output

rank2return

Compute the portfolio return knowing the rank of a stock in the input ...

rstar

Function to compute generalized correlation coefficients r*(x,y).

silentMtx

No-print kernel-causality unanimity score matrix with optional control...

silentMtx0

Older kernel-causality unanimity score matrix with optional control va...

silentPair2

kernel causality (version 2) scores with control variables

silentPairs

No-print kernel causality scores with control variables Hausman-Wu Cri...

silentPairs0

Older version, kernel causality weighted sum allowing control variable...

siPair2Blk

Block Version of silentPair2 for causality scores with control variabl...

siPairsBlk

Block Version of silentPairs for causality scores with control variabl...

some0Pairs

Function reporting detailed kernel causality results in a 7-column mat...

someCPairs

Kernel causality computations admitting control variables.

someCPairs2

Kernel causality computations admitting control variables reporting a ...

someMagPairs

Summary magnitudes after removing control variables in several pairs w...

somePairs

Function reporting kernel causality results as a 7-column matrix.(depr...

somePairs2

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

sort_matrix

Sort all columns of matrix x with respect to the j-th column.

stdres

Residuals of kernel regressions of x on y when both x and y are standa...

stdz_xy

Standardize x and y vectors to achieve zero mean and unit variance.

stochdom2

Compute vectors measuring stochastic dominance of four orders.

sudoCoefParcor

Pseudo regression coefficients from generalized partial correlation co...

sudoCoefParcorH

Peudo regression coefficients from hybrid generalized partial correlat...

summaryRank

Compute ranks of rows of matrix and summarize them into a choice sugge...

symmze

Replace asymmetric matrix by max of abs values of [i,j] or [j,i] eleme...

wtdpapb

Creates input for the stochastic dominance function stochdom2

Function gmcmtx0() computes a more reliable (general) correlation matrix. Since causal paths from data are important for all sciences, the package provides many sophisticated functions. causeSummBlk() and causeSum2Blk() give easy-to-interpret causal paths. Let Z denote control variables and compare two flipped kernel regressions: X=f(Y, Z)+e1 and Y=g(X, Z)+e2. Our criterion Cr1 says that if |e1*Y|>|e2*X| then variation in X is more "exogenous or independent" than in Y, and the causal path is X to Y. Criterion Cr2 requires |e2|<|e1|. These inequalities between many absolute values are quantified by four orders of stochastic dominance. Our third criterion Cr3, for the causal path X to Y, requires new generalized partial correlations to satisfy |r*(x|y,z)|< |r*(y|x,z)|. The function parcorVec() reports generalized partials between the first variable and all others. The package provides several R functions including get0outliers() for outlier detection, bigfp() for numerical integration by the trapezoidal rule, stochdom2() for stochastic dominance, pillar3D() for 3D charts, canonRho() for generalized canonical correlations, depMeas() measures nonlinear dependence, and causeSummary(mtx) reports summary of causal paths among matrix columns. Portfolio selection: decileVote(), momentVote(), dif4mtx(), exactSdMtx() can rank several stocks. Functions whose names begin with 'boot' provide bootstrap statistical inference, including a new bootGcRsq() test for "Granger-causality" allowing nonlinear relations. A new tool for evaluation of out-of-sample portfolio performance is outOFsamp(). Panel data implementation is now included. See eight vignettes of the package for theory, examples, and usage tips. See Vinod (2019) \doi{10.1080/03610918.2015.1122048}.

  • Maintainer: H. D. Vinod
  • License: GPL (>= 2)
  • Last published: 2023-10-09