Factor rotation performed on PCA output
Moderators: EViews Gareth, EViews Moderator
Factor rotation performed on PCA output
Hi,
I would like to perform a varimax rotation on the output of a PCA to more readily interpret the "meaning" of the principal components.
What's the easiest way to do this? I have the PCA output but can't make the transition to a factor object to perform the varimax rotation.
Thx
T
I would like to perform a varimax rotation on the output of a PCA to more readily interpret the "meaning" of the principal components.
What's the easiest way to do this? I have the PCA output but can't make the transition to a factor object to perform the varimax rotation.
Thx
T
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Factor rotation performed on PCA output
Do you just have th output or do you have original data as well? Or at least the covariance matrix?
Re: Factor rotation performed on PCA output
Thx for you reply. I have the full raw data in Eviews 7.1
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Factor rotation performed on PCA output
Then just go directly to factor estimation.
Make a group out of the series of interest. Click on Proc/Make Factor from the and fill out the dialog. The covariance settings are on the second tab. If you want it to be the same as with principal components, you'll need to select Principal factors as your estimation method with User-specified number of factors equal to the number of variables, and Initial communalities set to 0 fraction of the diagonals. I'd double check the default loadings to make sure that you've matched your principal components results, but then you should be good to go.
Make a group out of the series of interest. Click on Proc/Make Factor from the and fill out the dialog. The covariance settings are on the second tab. If you want it to be the same as with principal components, you'll need to select Principal factors as your estimation method with User-specified number of factors equal to the number of variables, and Initial communalities set to 0 fraction of the diagonals. I'd double check the default loadings to make sure that you've matched your principal components results, but then you should be good to go.
Re: Factor rotation performed on PCA output
Hi, thx. I ran the procedure but the loadings for F1 using Proc/Make Factor are different to those for PC1 using Proc/Make Principal Components. Any clue why?
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Factor rotation performed on PCA output
I misspoke. First, you need to set the fraction of diagonals to 1.
And then to match the eigenvalues to the factor loadings, you need to multiply the principal components loadings by the square root of the associated eigenvalues.
And then to match the eigenvalues to the factor loadings, you need to multiply the principal components loadings by the square root of the associated eigenvalues.
Re: Factor rotation performed on PCA output
I multiplied the factor loadings from the factor analysis with the square root of the respective Eigenvalues from the PCA but the results did not match the loadings from the PCA.
Alternatively, I multiplied the loadings from the PCA with the square root of the respective Eigenvalues buth the results did not match the factor loadings from the factor analysis.
Is there a way to get the exact same PCA loadings from the PCA but using Proc/Make Factor? I.e. without any additional transformation? My aim is to rotate the PCA Eigenvectors to be able to interpret them better. So as a starting point for the rotation I need to have the exact same PCA loadings but using Proc/Make Factor.
I have searched the Internet for a mathematical derivation of PCA but using EFA, but can't find anything useful.
Alternatively, I multiplied the loadings from the PCA with the square root of the respective Eigenvalues buth the results did not match the factor loadings from the factor analysis.
Is there a way to get the exact same PCA loadings from the PCA but using Proc/Make Factor? I.e. without any additional transformation? My aim is to rotate the PCA Eigenvectors to be able to interpret them better. So as a starting point for the rotation I need to have the exact same PCA loadings but using Proc/Make Factor.
I have searched the Internet for a mathematical derivation of PCA but using EFA, but can't find anything useful.
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Factor rotation performed on PCA output
If you'd like to post your workfile with the estimated Factor object I can take a look at why there is a discrepancy. I don't see a discrepancy in my test workfiles.
Factor analysis and principal components are slightly different. We don't offer ways of rotation for PC because it's not really an analysis tool; it's a data reduction tool. So the closest you'll get is rotating the root eigenvalue weighed loading.
Factor analysis and principal components are slightly different. We don't offer ways of rotation for PC because it's not really an analysis tool; it's a data reduction tool. So the closest you'll get is rotating the root eigenvalue weighed loading.
Re: Factor rotation performed on PCA output
Thx Glenn, I attached the file. The group name is g_all. I performed the PCA using the correlations matrix.
Re: Factor rotation performed on PCA output
Didn't seem to work, let me try again
Re: Factor rotation performed on PCA output
ok, had to extract the group with the files into a new workfile and zip it.
- Attachments
-
- us g_all.zip
- Group g_all
- (1.17 MiB) Downloaded 1009 times
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Factor rotation performed on PCA output
Here's a quick program which shows the equivalence. Note that I only do the first 270 columns of the matrix since the last few eigenvalues are negative.
Code: Select all
' principal components eigenvales and eigenvectors
g_all.pcomp(eigval=eval, eigvec=evec)
matrix evec_sub = @subextract(evec, 1, 1, @rows(eval), 270)
matrix eval_sub = @subextract(eval, 1, 1, 270, 1)
' scaled principal components eigenvectors
matrix sevec = @scale(evec_sub, @sqrt(@transpose(eval_sub)))
' factor analysis
factor f1.pf(n=270, priors=frac, priorfrac=1) g_all
' factor analsyis loadings
matrix fevec = f1.@loadings
' difference
matrix diff = sevec - fevec
Re: Factor rotation performed on PCA output
Thx Glenn, I understand what you did. But shouldn't the diff matrix have only zeros (or very close to zeros) to show the equivalence?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Factor rotation performed on PCA output
When I run his program, the diff matrix is full of zeros.
Re: Factor rotation performed on PCA output
This is very awkward, I just ran it again, step by step and I still get very different coefficents/loadings in the sevec and fevec matrices.
I'm attaching an Excel file with the output for each matrix, vector and intermediate calculation of the program (only the first two PCs or Factors and only the first ten variables). V = Variable, PC = Principal Component, F = Factor.
Could check with your outputs to see where the difference between your outputs and mine lie(s)?
Thx
T
I'm attaching an Excel file with the output for each matrix, vector and intermediate calculation of the program (only the first two PCs or Factors and only the first ten variables). V = Variable, PC = Principal Component, F = Factor.
Could check with your outputs to see where the difference between your outputs and mine lie(s)?
Thx
T
- Attachments
-
- PCA & EFA equivalence.xls
- Program outputs in Excel
- (16.5 KiB) Downloaded 703 times
Who is online
Users browsing this forum: No registered users and 2 guests
