Skip to contents

Computes the pairwise total correlation (totalCor) for a dataset

Usage

totalCorMat(data, base = 2.718282, normalized = FALSE)

Arguments

data

Matrix or data frame. Should consist only of variables to be used in the analysis

base

Numeric (length = 1). Base to use for entropy. Defaults to exp(1) or 2.718282

normalized

Boolean (length = 1). Should the normalized total correlation be computed? Defaults to FALSE

Value

Returns a symmetric matrix with pairwise total correlations

References

Formalization of total correlation
Watanabe, S. (1960). Information theoretical analysis of multivariate correlation. IBM Journal of Research and Development 4, 66-82.

Applied implementation
Felix, L. M., Mansur-Alves, M., Teles, M., Jamison, L., & Golino, H. (2021). Longitudinal impact and effects of booster sessions in a cognitive training program for healthy older adults. Archives of Gerontology and Geriatrics, 94, 104337.

Author

Hudson F. Golino <hfg9s at virginia.edu>

Examples

# Compute total correlation matrix
totalCorMat(wmt2[,7:24])
#>              wmt1        wmt2        wmt3       wmt4        wmt5       wmt6
#> wmt1  0.624817135 0.047707622 0.031851357 0.05047906 0.038912876 0.02972736
#> wmt2  0.047707622 0.484812687 0.075134922 0.03545451 0.053387926 0.04501964
#> wmt3  0.031851357 0.075134922 0.570302768 0.03684021 0.030844984 0.05393775
#> wmt4  0.050479056 0.035454508 0.036840206 0.68522110 0.040401885 0.04769004
#> wmt5  0.038912876 0.053387926 0.030844984 0.04040188 0.624817135 0.03747466
#> wmt6  0.029727363 0.045019645 0.053937754 0.04769004 0.037474658 0.65409488
#> wmt7  0.018817442 0.029109614 0.031734590 0.04296057 0.035828402 0.06546754
#> wmt8  0.016015282 0.025457015 0.026680096 0.03632646 0.026785600 0.05034574
#> wmt9  0.015755493 0.035454508 0.021743467 0.03659122 0.028779250 0.05951256
#> wmt10 0.036839455 0.045252660 0.043476772 0.05202427 0.037855172 0.06639651
#> wmt11 0.016672725 0.012758941 0.021942523 0.01719187 0.018997777 0.02489353
#> wmt12 0.011339647 0.009305900 0.019035116 0.01789458 0.026327558 0.02752613
#> wmt13 0.008365243 0.017484400 0.020651167 0.01750122 0.024209852 0.03194460
#> wmt14 0.018206592 0.026512727 0.012268426 0.02243460 0.023569287 0.03624395
#> wmt15 0.013348508 0.013717579 0.018510643 0.02956033 0.018423900 0.04058197
#> wmt16 0.021619348 0.015649354 0.020337606 0.02157181 0.021619348 0.03120022
#> wmt17 0.015005149 0.008064207 0.008553547 0.01909624 0.022852337 0.02807133
#> wmt18 0.004274810 0.004855020 0.001817617 0.01113157 0.007512335 0.01385638
#>             wmt7       wmt8        wmt9       wmt10      wmt11       wmt12
#> wmt1  0.01881744 0.01601528 0.015755493 0.036839455 0.01667273 0.011339647
#> wmt2  0.02910961 0.02545701 0.035454508 0.045252660 0.01275894 0.009305900
#> wmt3  0.03173459 0.02668010 0.021743467 0.043476772 0.02194252 0.019035116
#> wmt4  0.04296057 0.03632646 0.036591224 0.052024273 0.01719187 0.017894583
#> wmt5  0.03582840 0.02678560 0.028779250 0.037855172 0.01899778 0.026327558
#> wmt6  0.06546754 0.05034574 0.059512564 0.066396511 0.02489353 0.027526133
#> wmt7  0.67954586 0.05694442 0.033315265 0.049013313 0.03305801 0.025908620
#> wmt8  0.05694442 0.68891070 0.051964796 0.035451439 0.02584155 0.033892819
#> wmt9  0.03331527 0.05196480 0.685221102 0.073502056 0.01719187 0.037215847
#> wmt10 0.04901331 0.03545144 0.073502056 0.668691389 0.02847137 0.018095584
#> wmt11 0.03305801 0.02584155 0.017191870 0.028471372 0.63234084 0.019820523
#> wmt12 0.02590862 0.03389282 0.037215847 0.018095584 0.01982052 0.626103747
#> wmt13 0.03115351 0.01955784 0.040855003 0.035841845 0.01160149 0.013038084
#> wmt14 0.04728538 0.02904453 0.062187854 0.044377004 0.01140559 0.025762229
#> wmt15 0.03967816 0.02710403 0.037405611 0.027862100 0.02217670 0.039538504
#> wmt16 0.02704778 0.02801873 0.039894214 0.037555858 0.02216847 0.016789058
#> wmt17 0.02347805 0.01639631 0.017400707 0.009663726 0.01253966 0.022280639
#> wmt18 0.01193312 0.01842671 0.009976015 0.013898093 0.01420743 0.008166184
#>             wmt13      wmt14      wmt15      wmt16       wmt17       wmt18
#> wmt1  0.008365243 0.01820659 0.01334851 0.02161935 0.015005149 0.004274810
#> wmt2  0.017484400 0.02651273 0.01371758 0.01564935 0.008064207 0.004855020
#> wmt3  0.020651167 0.01226843 0.01851064 0.02033761 0.008553547 0.001817617
#> wmt4  0.017501218 0.02243460 0.02956033 0.02157181 0.019096236 0.011131570
#> wmt5  0.024209852 0.02356929 0.01842390 0.02161935 0.022852337 0.007512335
#> wmt6  0.031944599 0.03624395 0.04058197 0.03120022 0.028071327 0.013856382
#> wmt7  0.031153512 0.04728538 0.03967816 0.02704778 0.023478053 0.011933123
#> wmt8  0.019557841 0.02904453 0.02710403 0.02801873 0.016396306 0.018426712
#> wmt9  0.040855003 0.06218785 0.03740561 0.03989421 0.017400707 0.009976015
#> wmt10 0.035841845 0.04437700 0.02786210 0.03755586 0.009663726 0.013898093
#> wmt11 0.011601492 0.01140559 0.02217670 0.02216847 0.012539662 0.014207432
#> wmt12 0.013038084 0.02576223 0.03953850 0.01678906 0.022280639 0.008166184
#> wmt13 0.681174912 0.03438768 0.02578299 0.03519994 0.006879487 0.006039564
#> wmt14 0.034387683 0.68792484 0.04246529 0.03071158 0.019807222 0.019624270
#> wmt15 0.025782992 0.04246529 0.63294669 0.03133728 0.017552374 0.018307311
#> wmt16 0.035199944 0.03071158 0.03133728 0.64109140 0.016615388 0.019862741
#> wmt17 0.006879487 0.01980722 0.01755237 0.01661539 0.510752627 0.021840887
#> wmt18 0.006039564 0.01962427 0.01830731 0.01986274 0.021840887 0.573849789