WOLFRAM

PillaiTrace[m1,m2]

gives Pillai's trace for the matrices m1 and m2.

Details

  • PillaiTrace[m1,m2] gives Pillai's trace between m1 and m2.
  • Pillai's trace is a measure of linear dependence based on partitions of the pooled covariance matrix.
  • Pillai's trace is computed as Tr[TemplateBox[{{(, {Sigma, _, {(, 11, )}}, )}}, Inverse].Sigma_(12).TemplateBox[{{(, {Sigma, _, {(, 22, )}}, )}}, Inverse].Sigma_(21)] where is the covariance matrix of the pooled sample, which can be partitioned into where and correspond to the covariance matrices of the individual datasets.
  • The arguments m1 and m2 can be any realvalued matrices or vectors of equal length.

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

Compute Pillai's trace for two matrices:

Out[3]=3

Pillai's trace for two vectors:

Out[2]=2

Pillai's trace for a matrix and a vector:

Out[3]=3

Scope  (3)Survey of the scope of standard use cases

Pillai's trace is typically used to detect linear dependence between random matrices:

Values tend to be near 1 for dependent matrices:

Out[5]=5

The value is much smaller for independent matrices:

Out[6]=6

Pillai's trace for machine-precision reals:

Out[1]=1

Use arbitrary precision:

Out[1]=1

Properties & Relations  (4)Properties of the function, and connections to other functions

Pillai's trace measures linear dependence:

Out[2]=2

Pillai's trace cannot detect nonlinear dependency:

Out[4]=4

HoeffdingD can be used to detect some nonlinear dependence structures:

Out[5]=5

Pillai's trace is asymptotically equivalent to WilksW:

Out[1]=1

Statistical significance can be tested using PillaiTraceTest:

Out[3]=3
Out[4]=4

Alternatively, use IndependenceTest to automatically choose a test:

Out[5]=5
Wolfram Research (2012), PillaiTrace, Wolfram Language function, https://reference.wolfram.com/language/ref/PillaiTrace.html.
Wolfram Research (2012), PillaiTrace, Wolfram Language function, https://reference.wolfram.com/language/ref/PillaiTrace.html.

Text

Wolfram Research (2012), PillaiTrace, Wolfram Language function, https://reference.wolfram.com/language/ref/PillaiTrace.html.

Wolfram Research (2012), PillaiTrace, Wolfram Language function, https://reference.wolfram.com/language/ref/PillaiTrace.html.

CMS

Wolfram Language. 2012. "PillaiTrace." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PillaiTrace.html.

Wolfram Language. 2012. "PillaiTrace." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PillaiTrace.html.

APA

Wolfram Language. (2012). PillaiTrace. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PillaiTrace.html

Wolfram Language. (2012). PillaiTrace. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PillaiTrace.html

BibTeX

@misc{reference.wolfram_2025_pillaitrace, author="Wolfram Research", title="{PillaiTrace}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/PillaiTrace.html}", note=[Accessed: 19-May-2025 ]}

@misc{reference.wolfram_2025_pillaitrace, author="Wolfram Research", title="{PillaiTrace}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/PillaiTrace.html}", note=[Accessed: 19-May-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_pillaitrace, organization={Wolfram Research}, title={PillaiTrace}, year={2012}, url={https://reference.wolfram.com/language/ref/PillaiTrace.html}, note=[Accessed: 19-May-2025 ]}

@online{reference.wolfram_2025_pillaitrace, organization={Wolfram Research}, title={PillaiTrace}, year={2012}, url={https://reference.wolfram.com/language/ref/PillaiTrace.html}, note=[Accessed: 19-May-2025 ]}