Panpca
objectsGeneric functions for Panpca
objects.
# S3 method for Panpca
plot(x, cum = FALSE, col = "black", ...)# S3 method for Panpca
summary(object, ...)
A Panpca
object, see below.
Logical, default is FALSE, indicating if explained variance should be plotted per component or cumulative.
Color, default is "black", of interior and border of bars in the barplot.
Optional graphical arguments.
A Panpca
object, see below.
A Panpca
object contains the results from a principal component analysis (PCA) on
a pan-matrix, and is the output from the function panpca
. It is a small (S3) extension
of a list
, and contains the elements Evar, Scores, Loadings, Scale
and Weights.
The basic idea of a PCA is to find alternative directions in the space spanned by the pan-matrix columns, in order to be able to visualize or in other ways extract the most relevant information in a small number of dimensions. The variable Evar contains the explained variance for each principal component, scaled such that summed over all components it is 1.0. This quantity indicates the importance of each component, larger values of Evar indicates directions (components) with more information.
The plot.Panpca
function shows the Evar values in a barplot. You can either plot
the Evar value of each component separately (cum=FALSE) or the cumulative value
(cum=TRUE). This is the basic plot to follow any principal component decomposition, since it
tells you how many components you need to capture the bulk of the information in the data. If e.g.
component 1, 2 and 3 have Evar values of 0.4, 0.3 and 0.2, respectively, it means these three
direction capture 90% (0.4+0.3+0.2=0.9) of all the variation in the data. For some pan-matrices almost
all variation can be found in the very few first directions, but more often it is scattered between many.
See plotScores
and plotLoadings
for other informative graphical displays of
a Panpca
object.
The summary.Panpca
function will print the same information as plotted by
plot.Panpca
.
# NOT RUN {
# See examples in the Help-file for panpca.
# }
Run the code above in your browser using DataLab