gx.rqpca.loadplot: Function to Graphically Display PCA Loadings

Description Usage Arguments Details Author(s) References See Also Examples

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)

Example output

Loading required package: MASS
Loading required package: fastICA
  ** Are the data/parts all in the same measurement units? **
  n =  25 	nc =  15 	p =  6 		nc/p =  2.5 
  *** Proceed with Care, Core Size is < 5p ***
  *** Proceed With Great Care, nc =  15 , which is < 3p ***
  Eigenvalues: 1.684 1.315 0.9192 0.6199 0.4622 5.028e-17 
     as %ages: 33.7 26.3 18.4 12.4 9.2 0 
  Score S^2s : 2.45 2.913 18.14 8.072 2.654 1.546e-17 
     as %ages: 7.2 8.5 53 23.6 7.8 0 
Warning messages:
1: In par(old.par) : graphical parameter "cin" cannot be set
2: In par(old.par) : graphical parameter "cra" cannot be set
3: In par(old.par) : graphical parameter "csi" cannot be set
4: In par(old.par) : graphical parameter "cxy" cannot be set
5: In par(old.par) : graphical parameter "din" cannot be set
6: In par(old.par) : graphical parameter "page" cannot be set

rgr documentation built on May 2, 2019, 6:09 a.m.

Related to gx.rqpca.loadplot in rgr...