Factoran and postive definite matrix

2 Ansichten (letzte 30 Tage)
Charles
Charles am 11 Jan. 2017
Bearbeitet: John Chilleri am 12 Jan. 2017
I wish to perform some factor analysis on my portfolio I have a matrix of returns and wish to use the factoran function to derive loading, and specificVar as per code below
[Loadings,specificVar,T,stats] = factoran(rsV_new,2,'rotate','none');
My validation matrix is 100x100. I have tested it to ensure it is positive definite using chol, and I get a value of 0 for p. This confirms it is positive definite
[R,p] = chol(rsV_new);
However when I use the the following I get an error message suggesting my input is not positive definite.
[Loadings,specificVar,T,stats] = factoran(rsV_new,2,'rotate','none');
Error using factoran (line 162) The data X must have a covariance matrix that is positive definite.
I have looked at the the eigen values and some are small, other are zero and some are even negative. Is this the issue? Does factoran not like my eigen values?
  1 Kommentar
John Chilleri
John Chilleri am 12 Jan. 2017
Bearbeitet: John Chilleri am 12 Jan. 2017
rsV_new does not need to be PD. The documentation ( Factoran Analysis ) has an example provided using the data set carbig, in which the X matrix is not PD. I think your input matrix might be incorrectly formed, as it requires specific dimensions according to the documentation.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Dimensionality Reduction and Feature Extraction finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by