parcorBMany: Block version reports many generalized partial correlation...

View source: R/parcorBMany.R

parcorBManyR Documentation

Block version reports many generalized partial correlation coefficients allowing control variables.


This function calls a block version parcorBijk of the function which uses original data to compute generalized partial correlations between X_{idep} and X_j where j can be any one of the remaining variables in the input matrix mtx. Partial correlations remove the effect of variables X_k other than X_i and X_j. Calculation further allows for the presence of control variable(s) (if any) to remain always outside the input matrix and whose effect is also removed in computing partial correlations.


parcorBMany(mtx, ctrl = 0, dig = 4, idep = 1, blksiz = 10, verbo = FALSE)



Input data matrix with at least 3 columns.


Input vector or matrix of data for control variable(s), default is ctrl=0 when control variables are absent


The number of digits for reporting (=4, default)


The column number of the dependent variable (=1, default)


block size, default=10, if chosen blksiz >n, where n=rows in matrix then blksiz=n. That is, no blocking is done


Make this TRUE for detailed printing of computational steps


A five column ‘out’ matrix containing partials. The first column has the name of the idep variable. The second column has the name of the j variable, while the third column has partial correlation coefficients r*(i,j | k).The last column reports the absolute difference between two partial correlations.


This function reports all partial correlation coefficients, while avoiding ridge type adjustment.


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


Vinod, H. D. 'Generalized Correlations and Instantaneous Causality for Data Pairs Benchmark,' (March 8, 2015)

Vinod, H. D. (2021) 'Generalized, Partial and Canonical Correlation Coefficients' Computational Economics, 59(1), 1–28.

Vinod, H. D. 'Matrix Algebra Topics in Statistics and Economics Using R', Chapter 4 in Handbook of Statistics: Computational Statistics with R, Vol.32, co-editors: M. B. Rao and C.R. Rao. New York: North Holland, Elsevier Science Publishers, 2014, pp. 143-176.

See Also

See Also parcor_ijk, parcorMany.


z=runif(10,2,11)# z is independently created
x=sample(1:10)+z/10  #x is partly indep and partly affected by z
y=1+2*x+3*z+rnorm(10)# y depends on x and z not vice versa
parcorBMany(mtx, blksiz=10)
## Not run: 
colnames(x)=c('V1', 'v2', 'V3')
parcorBMany(x, idep=1)

## End(Not run)

generalCorr documentation built on May 1, 2023, 9:06 a.m.