Object Reference : Object View and Procedure Reference : Matrix
Principal components analysis of the columns in a matrix.
There are two forms of the pcomp command. The first form, which applies when displaying eigenvalue table output or graphs of the ordered eigenvalues, has only options and no command argument.
The second form, which applies to the graphs of component loadings, component scores, and biplots, uses the optional argument to determine which components to plot. In this form:
matrix_name.pcomp(options) [graph_list]
where the [graph_list] is an optional list of integers and/or vectors containing integers identifying the components to plot. Multiple pairs are handled using the method specified in the “mult=” option.
If the list of component indices omitted, EViews will plot only first and second components. Note that the order of elements in the list matters; reversing the order of two indices reverses the axis on which each component is displayed.
out=arg (default=“table”)
Output: table of eigenvalue and eigenvector results (“table”), graphs of ordered eigenvalues (“graph”), graph of the eigenvectors (“loadings”), graph of the component scores (“scores”), biplot of the loadings and scores (“biplot”).
Note: when specifying the eigenvalue graph (“out=graph”), the option keywords “scree” (scree graph), “diff” (difference in successive eigenvalues), and “cproport” (cumulative proportion of total variance) may be included to control the output. By default, EViews will display the scree graph. If you may one or more the three keywords, EViews will construct the graph using only the specified types.
Maximum number of components to retain when presenting table (“out=table”) or eigenvalue graph (“out=graph”) results.
The default is to set to the number of variables.
EViews will retain the minimum number satisfying any of: “n=”, “mineig=” or “cproport=”.
mineig=arg (default=0)
Minimum eigenvalue threshold value: we retain components with eigenvalues that are greater than or equal to the threshold.
EViews will retain the minimum number satisfying any of: “n=”, “mineig=” or “cproport=”.
cproport=arg (default=1)
Cumulative proportion threshold value: we retain , the number of components required for the sum of the first eigenvalues exceeds the specified value for the cumulative variance explained proportion.
EViews will retain the minimum number satisfying any of: “n=”, “mineig=” or “cproport=”.
Specify name of vector to hold the saved the eigenvalues in workfile.
Specify name of matrix to hold the save the eigenvectors in workfile.
Force the dialog to appear from within a program.
Print results.
Covariance Options
cov=arg (default=“cov”)
Covariance calculation method: ordinary (Pearson product moment) covariance (“cov”), ordinary correlation (“corr”), Spearman rank covariance (“rcov”), Spearman rank correlation (“rcorr”), Kendall’s tau-b (“taub”), Kendall’s tau-a (“taua”), uncentered ordinary covariance (“ucov”), uncentered ordinary correlation (“ucorr”).
wgt=name (optional)
Name of vector containing weights. The number of rows of the weight vector should match the number of rows in the original matrix.
wgtmethod=arg (default = “sstdev”
Weighting method: frequency (“freq”), inverse of variances (“var”), inverse of standard deviation (“stdev”), scaled inverse of variances (“svar”), scaled inverse of standard deviations (“sstdev”).
Only applicable for ordinary (Pearson) calculations where “weights=” is specified. Weights for rank correlation and Kendall’s tau calculations are always frequency weights.
Compute using pairwise deletion of observations with missing cases (pairwise samples).
Compute covariances with a degree-of-freedom correction accounting for the mean (for centered specifications) and any partial conditioning variables.
The default behavior in these cases is to perform no adjustment (e.g. – compute sample covariance dividing by rather than ).
Graph Options
scale=arg, (default=“normload”)
Diagonal matrix scaling of the loadings and the scores: normalize loadings (“normload”), normalize scores (“normscores”), symmetric weighting (“symmetric”), user-specified (arg=number).
mult =arg (default=“first”)
Multiple series handling: plot first against remainder (“first”), plot as x-y pairs (“pair”), lower-triangular plot (“lt”).
Do not center graphs around the origin. By default, EViews centers biplots around (0, 0).
labels=arg, (default=“outlier”)
Observation labels for the scores: outliers only (“outlier”), all points (“all”), none (“none”).
Probability value for determining whether a point is an outlier according to the chi-square tests based on the squared Mahalanbois distance between the observation and the sample means (when using the “labels=outlier” option).
Scale factor applied to the automatically specified loadings when displaying both loadings and scores). The default is to let EViews auto-choose a scale or to specify “userscale=” to scale the original loadings.
Scale factor applied to the original loadings when displaying both loadings and scores). The default is to let EViews auto-choose a scale, or to specify “autoscale=” to scale the automatically scaled loadings.
Compute the normalization for the score so that cross-products match the target (by default, EViews chooses a normalization scale so that the moments of the scores match the target).
freeze(tab1) mat1.pcomp(method=corr, eigval=v1, eigvec=m1)
stores the table view of the eigenvalues and eigenvectors of MAT1 in a table object named tab1, the eigenvalues in a vector named v1, and the eigenvectors in a matrix named m1.
mat1.pcomp(method=cov, out=graph)
displays the scree plot of the ordered eigenvalues computed from the covariance matrix.
mat1.pcomp(method=rcorr, out=biplot, scale=normscores)
displays a biplot where the scores are normalized to have variances that equal the eigenvalues of the Spearman correlation matrix computed for the series in MAT1.
See “Principal Components” for further discussion. See also “Covariance Analysis” for discussion of the preliminary computation.
Note that this view analyzes the eigenvalues and eigenvectors of a covariance (or other association) matrix computed from the series in a group or the columns of a matrix. You may use Sym::eigen to examine the eigenvalues of a symmetric matrix.