| Statistics Toolbox™ | ![]() |
biplot(coefs)
biplot(coefs,...,'Scores',scores)
biplot(coefs,...,'VarLabels',varlabels)
biplot(coefs,...,'Scores',scores,'ObsLabels',obslabels)
biplot(coeffs,...,PropertyName,PropertyValue,...)
h = biplot(coefs,...)
biplot(coefs) creates a biplot of the coefficients in the matrix coefs. The biplot is two-dimensional if coefs has two columns or three-dimensional if it has three columns. coefs usually contains principal component coefficients created with princomp, pcacov, or factor loadings estimated with factoran. The axes in the biplot represent the principal components or latent factors (columns of coefs), and the observed variables (rows of coefs) are represented as vectors.
biplot(coefs,...,'Scores',scores) plots both coefs and the scores in the matrix scores in the biplot. scores usually contains principal component scores created with princomp or factor scores estimated with factoran. Each observation (row of scores) is represented as a point in the biplot.
A biplot allows you to visualize the magnitude and sign of each variable's contribution to the first two or three principal components, and how each observation is represented in terms of those components.
biplot imposes a sign convention, forcing the element with largest magnitude in each column of coefs to be positive.
biplot(coefs,...,'VarLabels',varlabels) labels each vector (variable) with the text in the character array or cell array varlabels.
biplot(coefs,...,'Scores',scores,'ObsLabels',obslabels) uses the text in the character array or cell array obslabels as observation names when displaying data cursors.
biplot(coeffs,...,PropertyName,PropertyValue,...) sets properties to the specified property values for all line graphics objects created by biplot.
h = biplot(coefs,...) returns a column vector of handles to the graphics objects created by biplot. The h contains, in order, handles corresponding to variables (line handles, followed by marker handles, followed by text handles), to observations (if present, marker handles followed by text handles), and to the axis lines.
Perform a principal component analysis of the data in carsmall.mat:
load carsmall x = [Acceleration Displacement Horsepower MPG Weight]; x = x(all(~isnan(x),2),:); [coefs,score] = princomp(zscore(x));
View the data and the original variables in the space of the first three principal components:
vbls = {'Accel','Disp','HP','MPG','Wgt'};
biplot(coefs(:,1:3),'scores',score(:,1:3),...
'varlabels',vbls);

factoran, princomp, pcacov, rotatefactors
![]() | binostat | bootci | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |