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.
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?
回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!