Page 1 of 2

Factor rotation performed on PCA output

Posted: Tue Aug 07, 2012 3:07 pm
by bernerth
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

Re: Factor rotation performed on PCA output

Posted: Tue Aug 07, 2012 8:44 pm
by EViews Glenn
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

Posted: Wed Aug 08, 2012 8:06 am
by bernerth
Thx for you reply. I have the full raw data in Eviews 7.1

Re: Factor rotation performed on PCA output

Posted: Wed Aug 08, 2012 9:51 am
by EViews Glenn
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.

Re: Factor rotation performed on PCA output

Posted: Wed Aug 08, 2012 12:20 pm
by bernerth
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?

Re: Factor rotation performed on PCA output

Posted: Wed Aug 08, 2012 4:15 pm
by EViews Glenn
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.

Re: Factor rotation performed on PCA output

Posted: Thu Aug 09, 2012 8:34 am
by bernerth
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.

Re: Factor rotation performed on PCA output

Posted: Thu Aug 09, 2012 10:59 am
by EViews Glenn
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.

Re: Factor rotation performed on PCA output

Posted: Thu Aug 09, 2012 12:45 pm
by bernerth
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

Posted: Thu Aug 09, 2012 12:46 pm
by bernerth
Didn't seem to work, let me try again

Re: Factor rotation performed on PCA output

Posted: Thu Aug 09, 2012 12:57 pm
by bernerth
ok, had to extract the group with the files into a new workfile and zip it.

Re: Factor rotation performed on PCA output

Posted: Thu Aug 09, 2012 2:36 pm
by EViews Glenn
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

Posted: Mon Aug 13, 2012 3:23 pm
by bernerth
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?

Re: Factor rotation performed on PCA output

Posted: Mon Aug 13, 2012 3:46 pm
by EViews Gareth
When I run his program, the diff matrix is full of zeros.

Re: Factor rotation performed on PCA output

Posted: Tue Aug 14, 2012 8:48 am
by bernerth
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