Page 1 of 1
PCA
Posted: Sun Jan 26, 2014 1:52 pm
by abcd
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
Re: PCA
Posted: Mon Jan 27, 2014 2:34 pm
by EViews Glenn
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.
Re: PCA
Posted: Wed Jan 29, 2014 3:39 am
by abcd
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.
Re: PCA
Posted: Wed Jan 29, 2014 10:38 am
by EViews Glenn
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.