Factoran and postive definite matrix

3 ビュー (過去 30 日間)
Charles
Charles 2017 年 1 月 11 日
編集済み: John Chilleri 2017 年 1 月 12 日
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 件のコメント
John Chilleri
John Chilleri 2017 年 1 月 12 日
編集済み: John Chilleri 2017 年 1 月 12 日
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.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeDimensionality Reduction and Feature Extraction についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by