Statistics Toolbox | ![]() ![]() |
Bartlett's test for dimensionality
Syntax
Description
returns the number of dimensions necessary to explain the nonrandom variation in the data matrix ndim = barttest(x,alpha)
x
, using the significance probability alpha
. The dimension is determined by a series of hypothesis tests. The test for ndim=1
tests the hypothesis that the variances of the data values along each principal component are equal, the test for ndim=2
tests the hypothesis that the variances along the second through last components are equal, and so on.
returns the number of dimensions, the significance values for the hypothesis tests, and the [ndim,prob,chisquare] = barttest(x,alpha)
2 values associated with the tests.
Example
x = mvnrnd([0 0],[1 0.99; 0.99 1],20); x(:,3:4) = mvnrnd([0 0],[1 0.99; 0.99 1],20); x(:,5:6) = mvnrnd([0 0],[1 0.99; 0.99 1],20); [ndim, prob] = barttest(x,0.05) ndim = 3 prob = 0 0 0 0.5081 0.6618
See Also
princomp
, pcacov
, pcares
![]() | aoctool | bbdesign | ![]() |