Factor rotation performed on PCA output

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

bernerth
Posts: 14
Joined: Thu Jul 08, 2010 11:59 am

Factor rotation performed on PCA output

Postby bernerth » Tue Aug 07, 2012 3:07 pm

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

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Factor rotation performed on PCA output

Postby EViews Glenn » Tue Aug 07, 2012 8:44 pm

Do you just have th output or do you have original data as well? Or at least the covariance matrix?

bernerth
Posts: 14
Joined: Thu Jul 08, 2010 11:59 am

Re: Factor rotation performed on PCA output

Postby bernerth » Wed Aug 08, 2012 8:06 am

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

Postby EViews Glenn » Wed Aug 08, 2012 9:51 am

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.

bernerth
Posts: 14
Joined: Thu Jul 08, 2010 11:59 am

Re: Factor rotation performed on PCA output

Postby bernerth » Wed Aug 08, 2012 12:20 pm

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

Postby EViews Glenn » Wed Aug 08, 2012 4:15 pm

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.

bernerth
Posts: 14
Joined: Thu Jul 08, 2010 11:59 am

Re: Factor rotation performed on PCA output

Postby bernerth » Thu Aug 09, 2012 8:34 am

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.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Factor rotation performed on PCA output

Postby EViews Glenn » Thu Aug 09, 2012 10:59 am

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.

bernerth
Posts: 14
Joined: Thu Jul 08, 2010 11:59 am

Re: Factor rotation performed on PCA output

Postby bernerth » Thu Aug 09, 2012 12:45 pm

Thx Glenn, I attached the file. The group name is g_all. I performed the PCA using the correlations matrix.

bernerth
Posts: 14
Joined: Thu Jul 08, 2010 11:59 am

Re: Factor rotation performed on PCA output

Postby bernerth » Thu Aug 09, 2012 12:46 pm

Didn't seem to work, let me try again

bernerth
Posts: 14
Joined: Thu Jul 08, 2010 11:59 am

Re: Factor rotation performed on PCA output

Postby bernerth » Thu Aug 09, 2012 12:57 pm

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

Postby EViews Glenn » Thu Aug 09, 2012 2:36 pm

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

bernerth
Posts: 14
Joined: Thu Jul 08, 2010 11:59 am

Re: Factor rotation performed on PCA output

Postby bernerth » Mon Aug 13, 2012 3:23 pm

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

Postby EViews Gareth » Mon Aug 13, 2012 3:46 pm

When I run his program, the diff matrix is full of zeros.

bernerth
Posts: 14
Joined: Thu Jul 08, 2010 11:59 am

Re: Factor rotation performed on PCA output

Postby bernerth » Tue Aug 14, 2012 8:48 am

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
Attachments
PCA & EFA equivalence.xls
Program outputs in Excel
(16.5 KiB) Downloaded 703 times


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests