很容易实现
The principal components view of the group displays the Eugene-decomposition of the sample second moment of a group of series. Select View/Principal Components... to call up the dialog.
You may either decompose the sample covariance matrix or the correlation matrix computed for the series in the group. The sample second moment matrix is computed using data in the current workfile sample. If there are any missing values, the sample second moment is computed using the common sample where observations within the workfile range with missing values are dropped.
There is also a checkbox that allows you to correct for degrees of freedom in the computation of the covariances. If you select this option, EViews will divide the sum of squared deviations by instead of .
You may store the results in your workfile by simply providing the names in the appropriate fields. To store the first principal component series, simply list names in the Component series edit field, each separated by a space. Note that you cannot store more principal components than there are series in the group. You may also store the eigenvalues and eigenvectors in a named vector and matrix.
The principal component view displays output that looks as follows:
The column headed by "Comp1" and "Vector1" corresponds to the first principal component, "Comp2" and "Vector2" denote the second principal component and so on. The row labeled "Eigenvalue" reports the eigenvalues of the sample second moment matrix in descending order from left to right. The Variance Prop. row displays the variance proportion explained by each principal component. This value is simply the ratio of each eigenvalue to the sum of all eigenvalues. The Cumulative Prop. row displays the cumulative sum of the Variance Prop. row from left to right and is the variance proportion explained by principal components up to that order.
The second part of the output table displays the eigenvectors corresponding to each eigenvalue. The first principal component is computed as a linear combination of the series in the group with weights given by the first eigenvector. The second principal component is the linear combination with weights given by the second eigenvector and so on.
Copyright ?1994-2005 Quantitative Micro Software, LLC. All rights reserved. Help system build: March 17, 2005. http://www.eviews.com.