pcomp |

Principal components analysis.

Syntax

group_name.pcomp(options) [indices]

where the elements to display in loadings, scores, and biplot graph form (“out=loadings”, “out=scores” or “out=biplot”) are given by the optional indices, (e.g., “1 2 3” or “2 3”). If indices is not provided, the first two elements will be displayed.

Basic Options

out=arg (default=“table”) | Output type: eigenvector/eigenvalue table (“table”), eigenvalues graph (“graph”), loadings graph (“loadings”), scores graph (“scores”), biplot (“biplot”). |

eigval=vec_name | Specify name of vector to hold the saved the eigenvalues in workfile. |

eigvec=mat_name | Specify name of matrix to hold the save the eigenvectors in workfile. |

prompt | Force the dialog to appear from within a program. |

p | Print results. |

Table and Eigenvalues Plot Options

The number of elements to display in the table and eigenvalue graph form is given by the minimum of the elements specified using the “n=”, “mineigen=” and “cproport=” options.

The default eigenvalue graph shows a scree plot of the ordered eigenvalues. You may use the “scree”, “cproport”, and “diff” option keywords to display any combination of the scree plot, cumulative eigenvalue proportions plot, or eigenvalue difference plot.

n=arg (default=all) | Maximum number of components. |

mineigen=arg (default=0) | Minimum eigenvalue. |

cproport=arg (default=1.0) | Cumulative proportion of eigenvalue total to attain. |

scree | Display a scree plot of the eigenvalues (if “output=graph). |

diff | Display a graph of the eigenvalue differences (if “output=graph). |

cproport | Display a graph of the cumulative proportions (if “output=graph). |

Loadings, Scores, Biplot 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). |

cpnorm | Compute the normalization for the scores so that cross-products match the target (by default, EViews chooses a normalization scale so that the moments of the scores match the target). |

nocenter | Do not center the elements in the graph. |

mult=arg (default=”first”) | Multiple graph options: first versus remainder (“first”), pairwise (“pair”), all pairs arrayed in lower triangle (“lt”) |

labels=arg (default=“outlier”) | Scores label options: identify outliers only (“outlier”), all points (“all”), none (“none”). |

labelprob=arg (default=0.1) | Outlier label probability (if “labels=outlier”). |

autoscale=arg (default=1.0) | Rescaling factor for auto-scaling. |

userscale=arg | User-specified scaling. |

Covariance Options

cov=arg (default=“corr”) | Covariance calculation method: ordinary (Pearson product moment) covariance (“cov”), ordinary correlation (“corr”), Spearman rank covariance (“rcov”), Spearman rank correlation (“rcorr”), uncentered ordinary correlation (“ucorr”). Note that Kendall’s tau measures are not valid methods. |

wgt=name (optional) | Name of series containing weights. |

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. |

pairwise | Compute using pairwise deletion of observations with missing cases (pairwise samples). |

partial=arg | Compute partial covariances conditioning on the list of series specified in arg. |

df | 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 ). |

Examples

group g1 x1 x2 x3 x4

freeze(tab1) g1.pcomp(eigval=v1, eigvec=m1)

The first line creates a group named g1 containing the four series x1, x2, x3, x4. The second line produces a view of the basic results for the principal components. The output view is stored in a table named tab1, the eigenvalues in a vector named v1, and the eigenvectors in a matrix named m1.

g1.pcomp(out=graph)

g1.pcomp(out=graph, scree, cproport)

displays a screen plot of the eigenvalues, and a graph containing both a screen plot and a plot of the cumulative eigenvalue proportions.

g1.pcomp(out=loading)

displays a loadings plot, and

g1.pcomp(out=biplot, scale=symmetric, mult=lt) 1 2 3

displays a symmetric biplot for all three pairwise comparisons.

Cross-references