I used Eviews and Matlab to extract the factor loadings (eigenvectors) on a dataset. For a particular principle component (PC 3), Eviews shows negative signs on the factor loadings while Matlab had positive signs. Not sure if this is a bug in Eviews. I said this because a commercial software that I want to replicate using Eviews and/or Matlab computed the same factor loadings with signs consistent with those from Matlab.
Any ideas on why the signs flip flop for this principle component?
Eigenvectors from Principle Component Analysis
Moderators: EViews Gareth, EViews Moderator
-
EViews Esther
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: Eigenvectors from Principle Component Analysis
Please note that Matlab can choose different values for its eigenvectors than the ones EViews chooses. Let us say that we have a 2-by-2 symmetric matrix S, a non-zero 2-by-1 vector x and a scalar lambda (which can be either real and complex). An eigenvalue/eigenvector problem solves S*x=lambda*x, and if x is non-zero, the equation |S-lambda*I|=0 will have a solution. Let us define the eigenvectors corresponding to the given eigenvalues to be x1 and x2.
Since the choice for the eigenvectors is arbitrary (Matlab chooses the values such that the sum of the squares of the elements of each eigenvectors equals unity), the chosen eigenvectors of a system are not unique. However, the ratio of elements (e.g. the ratio of x1(1) and x1(2) and the ratio of x2(1) and x2(2)) is the same.
Also, please note that EViews arranges the eigenvalues in ascending order (while Matlab chooses the descending order) and the columns of the eigenvector matrix correspond to the sorted eigenvalues.
Since the choice for the eigenvectors is arbitrary (Matlab chooses the values such that the sum of the squares of the elements of each eigenvectors equals unity), the chosen eigenvectors of a system are not unique. However, the ratio of elements (e.g. the ratio of x1(1) and x1(2) and the ratio of x2(1) and x2(2)) is the same.
Also, please note that EViews arranges the eigenvalues in ascending order (while Matlab chooses the descending order) and the columns of the eigenvector matrix correspond to the sorted eigenvalues.
Who is online
Users browsing this forum: No registered users and 2 guests
