pla {prinvars}R Documentation

Principal Loading Analysis

Description

This function performs a principal loading analysis on the given data matrix.

Usage

pla(
  x,
  cor = FALSE,
  scaled_ev = FALSE,
  thresholds = 0.33,
  threshold_mode = c("cutoff", "percentage"),
  expvar = c("approx", "exact"),
  check = c("rnc", "rows"),
  ...
)

Arguments

x

a numeric matrix or data frame which provides the data for the principal loading analysis.

cor

a logical value indicating whether the calculation should use the correlation or the covariance matrix.

scaled_ev

a logical value indicating whether the eigenvectors should be scaled.

thresholds

a numeric value or list of numeric values used to determine "small" values inside the eigenvectors. If multiple values are given, a list of pla results will be returned.

threshold_mode

a character string indicating how the threshold is determined and used. cutoff indicates the usage of a threshold value. percentage indicates that the cutoff value is determined by the maximum element of each vector multiplied with the threshold value.

expvar

a character string indicating the method used for calculating the explained variance. approx uses the explained variance of each eigenvector i.e. its eigenvalue. exact uses the variance of each variable.

check

a character string indicating if only rows or rows as well as columns are used to detect the underlying block structure. rows checks if the rows fulfill the required structure. rnc checks if rows and columns fulfill the required structure.

...

further arguments passed to or from other methods.

Value

single or list of pla class containing the following attributes:

x

a numeric matrix or data frame which equals the input of x.

c

a numeric matrix or data frame which is the covariance or correlation matrix based on the input of cov.

loadings

a matrix of variable loadings (i.e. a matrix containing the eigenvectors of the dispersion matrix).

threshold

a numeric value which equals the input of thresholds.

threshold_mode

a character string which equals the input of threshold_mode.

blocks

a list of blocks which are identified by principal loading analysis.

See Bauer and Drabant (2021) for more information.

References

Bauer JO, Drabant B (2021). “Principal loading analysis.” Journal of Multivariate Analysis, 184, 104754. ISSN 0047259X, doi:10.1016/j.jmva.2021.104754.

Examples

if(requireNamespace("AER")){
require(AER)
data("OECDGrowth")

## The scales in OECDGrowth differ hence using the correlation matrix is
## highly recommended.

pla(OECDGrowth, thresholds=0.5) ## not recommended
pla(OECDGrowth, cor=TRUE, thresholds=0.5)

## We obtain three blocks: (randd), (gdp85, gdp60) and (invest, school,
## popgrowth). Block 1, i.e. the 1x1 block (randd), explains only 5.76% of
## the overall variance. Hence, discarding this block seems appropriate.

pla_obj = pla(OECDGrowth, cor=TRUE, thresholds=0.5)
pla.drop_blocks(pla_obj, c(1)) ## drop block 1

## Sometimes, considering the blocks we keep rather than the blocks we want
## to discard might be more convenient.

pla.keep_blocks(pla_obj, c(2,3)) ## keep block 2 and block 3
}


[Package prinvars version 1.0.0 Index]