rgr (version 1.1.15)

gx.rqpca.print: Function to Display PCA Loadings and Scores

Description

Function to display PCA matrices following computations by functions gx.mva, gx.mva.closed, gx.robmva, gx.robmva.closed or gx.rotate. The user may optionally display the loadings (default), the percentage contribution of the variables to the loadings, i.e. communalities (not default), and the scores on the PCs (default).

Usage

gx.rqpca.print(save, ifload = TRUE, ifcntrb = FALSE, ifscore = TRUE)

Arguments

save

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

ifload

if ifload = TRUE the PC loadings are displayed. The default is to display the PC loadings.

ifcntrb

if ifcntrb = TRUE the percentage contribution of each variable (communality) to each PC is displayed. The default is not to display this table.

ifscore

if ifscore = TRUE the scores on the PCs are displayed. The default is to display the PC loadings.

Value

The last displayed table, table.rows, is returned and may be saved as an object if required.

Details

By default the PCA loadings and scores on the PCs are displayed on the current device. Optionally the percentage contribution, communality, of each variable to each PC may also be displayed. Additionally a table of cumulative percent contributions, communalities, is displayed to assist in deciding how many components to retain for rotation or further study. When the saved object from gx.rotate is the input object both the original and Varimax loadings and scores will be displayed by default.

See Also

gx.rqpca.save, gx.mva, gx.mva.closed, gx.robmva, gx.robmva.closed, gx.rotate.

Examples

Run this code
# NOT RUN {
## Make test data available
data(sind.mat2open)

## Estimate and display robust PCA loadings and scores
sind.save <- gx.robmva.closed(sind.mat2open)
gx.rqpca.print(sind.save, ifcntrb = TRUE)

## Clean-up
rm(sind.save)
# }

Run the code above in your browser using DataLab