Function to Graphically Display PCA Loadings

Share:

Description

Function to graphically display PCA loadings computed by functions gx.mva, gx.mva.closed, gx.robmva, gx.robmva.closed or gx.rotate. The user may define the minimum absolute loading below which variables will not be graphically displayed, and modify the display title and text size as required.

Usage

1
2
gx.rqpca.loadplot(save, main = "", crit = 0.3, cex = 0.8, 
	cex.axis = 0.7, cex.main = 0.8)

Arguments

save

a saved object from any of functions gx.mva, gx.mva.closed,
gx.robmva or gx.robmva.closed.

main

an alternate plot title from that generated automatically from information in the saved object, see Details below.

crit

the lower limit of the absolute value of a loading for a variable to be displayed, by default crit = 0.3.

cex

the text scale expansion factor for the variable names in the display, by default cex = 0.8, a 20% font size reduction.

cex.axis

the text scale expansion factor for the axis labels of the display, by default cex.axis = 0.7, a 30% font size reduction.

cex.main

the text scale expansion factor for the display title, by default cex.axis = 0.8, a 20% font size reduction.

Details

If main is undefined the name of the matrix object supplied to the function is displayed, together with the value of crit. On the line below the name of the data matrix from which the PCA was derived is displayed. However, if an alternate plot title is preferred it may be defined, e.g., main = "Plot Title Text". If no plot title is required set main = " ".

If the variable names are longer than three characters the display can easily become cluttered. In which case the user should redefine the variable names in the input matrix from which the PCA was derived using the dimnames(matrix.name)[[2]] construct, and run the generating function again. Alternately, the variable names in the saved object may be changed directly via a redefinition of save$matnames[[2]].

Author(s)

Robert G. Garrett, based on a script by Peter Filzmoser

References

Reimann, C., Filzmoser, P., Garrett, R. and Dutter, R., 2008. Statistical Data Analysis Explained: Applied Environmental Statistics with R. John Wiley & Sons, Ltd., 362 p.

See Also

gx.mva, gx.mva.closed, gx.robmva, gx.robmva.closed, gx.rotate

Examples

1
2
3
4
5
6
7
8
9
## Make test data available
data(sind.mat2open)

## Estimate and display robust PCA loadings
sind.save <- gx.robmva.closed(sind.mat2open)
gx.rqpca.loadplot(sind.save)

## Clean-up
rm(sind.save)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.