Factoran and postive definite matrix

4 visualizzazioni (ultimi 30 giorni)
Charles
Charles il 11 Gen 2017
Modificato: John Chilleri il 12 Gen 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 Commento
John Chilleri
John Chilleri il 12 Gen 2017
Modificato: John Chilleri il 12 Gen 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.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Dimensionality Reduction and Feature Extraction in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by