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

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/gx.rqpca.print.R

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

1
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.

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.

Value

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

Note

For large tables, particularly scores, it may be preferrable to save them as ‘.csv’ files using gx.rqpca.save for inspection and later use.

Author(s)

Robert G. Garrett

See Also

gx.rqpca.save, 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 and scores
sind.save <- gx.robmva.closed(sind.mat2open)
gx.rqpca.print(sind.save, ifcntrb = TRUE)

## Clean-up
rm(sind.save)

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

Related to gx.rqpca.print in rgr...