PCA

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

abcd
Posts: 7
Joined: Fri Jan 17, 2014 9:59 am

PCA

Postby abcd » Sun Jan 26, 2014 1:52 pm

Hi
I am using the following command for using the PCA.
group g1 x1 x2 x3 x4
freeze(tab1) g1.pcomp(cor, eigval=v1, eigvec=m1) pc1 pc2

can any one explain me how Eviews is calculating the pc1 and Pc2 . when i manually calculate the pc1 and pc2 . they are not comming same.

how to same the eigvec into excel .

what option i can add for this

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

Re: PCA

Postby EViews Glenn » Mon Jan 27, 2014 2:34 pm

Impossible to say since you don't elaborate on what you are doing in Excel.

The EViews documentation provides great detail into the principal components computation, the most important of which may be that by default, we compute the components for the correlation matrix, not the covariance matrix.

Note that in your example you have saved the eigenvalues matrix to the workfile. You can use the matrix write proc to save the matrix to an Excel file.

abcd
Posts: 7
Joined: Fri Jan 17, 2014 9:59 am

Re: PCA

Postby abcd » Wed Jan 29, 2014 3:39 am

how to same the eigvec into excel .

sorry spelling mistake

how to same the eigvec into excel or how to import the eigvec values in to excel
and the procedure for calculateing pc1 and pc2 in excel manually or what is formula to calculate the pc1 and Pc2 in excel.

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

Re: PCA

Postby EViews Glenn » Wed Jan 29, 2014 10:38 am

After running your command

Code: Select all

v1.write(t=xls) v1.xls v2.write(t=xls) v2.xls
will save the eigenvalues and eigenvectors into Excel files.

The computation of the components is described in great detail in the manual. It doesn't make sense for me to try to repeat it here.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests