Factoran and postive definite matrix

2 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Dimensionality 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