Learn R Programming

rgr (version 1.1.0)

gx.rotate: Function to Perform a Kaiser Varimax Rotaion

Description

Function to perform a Kaiser Varimax rotation on Principal Component (PCA) loadings and scores in an object saved from gx.mva or gx.robmva.

Usage

gx.rotate(save, nrot = 2)

Arguments

save
a saved object from the execution of function gx.mva or gx.robmva.
nrot
the number of component loadings to be rotated, by default the first two components are rotated, nrot = 2.

Value

  • The value of nr is modified in, and the following are appended to, the object that was saved from gx.mva or gx.robmva:
  • nrmodified to equal the number of components rotated.
  • vloadthe new loadings after Varimax rotation.
  • vscorethe new scores after Varimax rotation.
  • vvcontribthe contribution of the rotated Varimax component to the total data variability.
  • pvvcontribthe contribution of the rotated Varimax component to the total data variability as a percentage.
  • cpvvcontribthe cumulative contribution of the rotated Varimax component to the total data variability as a percentage.

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. Venables, W.N. and Ripley, B.D., 2001. Modern Applied Statistics with S-Plus, 3rd Edition, Springer, 501 p.

See Also

gx.mva, gx.robmva, varimax, gx.rqpca.plot

Examples

Run this code
## Make test data available
data(sind)
sind.mat <- as.matrix(sind[, -c(1:3)])
## Ensure all data are in the same units (mg/kg)
sind.mat2open <- sind.mat
sind.mat2open[, 2] <- sind.mat2open[, 2] * 10000

## Save PCA results and display biplots before and after Varimax rotation
sind.save <- gx.mva(clr(sind.mat2open))
gx.rqpca.plot(sind.save)
gx.rqpca.plot(sind.save,
main = "Howarth & Sinding Larsen Stream Sediments
clr transform",
pch = 4, cex.main = 0.9)
sind.save.rot2 <- gx.rotate(sind.save)
gx.rqpca.plot(sind.save.rot2,
main = "Howarth & Sinding Larsen Stream Sediments
clr transform",
pch = 4, cex.main = 0.9)

## Clean-up
rm(sind.mat)
rm(sind.mat2open)
rm(sind.save)
rm(sind.save.rot2)

Run the code above in your browser using DataLab