generate.spc.matrix {abess}R Documentation

Generate matrix with sparse principal component

Description

Generate simulated matrix that its principal component are sparse linear combination of its columns.

Usage

generate.spc.matrix(
  n,
  p,
  support.size = 3,
  snr = 20,
  sigma = NULL,
  sparse.loading = NULL,
  seed = 1
)

Arguments

n

The number of observations.

p

The number of predictors of interest.

support.size

A integer specify the number of non-zero entries in the first column of loading matrix.

snr

A positive value controlling the signal-to-noise ratio (SNR). A larger SNR implies the identification of sparse matrix is much easier. Default snr = Inf enforces no noise exists.

sigma

A numerical vector with length p specify the standard deviation of each columns. Default sigma = NULL implies it is determined by snr. If it is supplied, support.size would be omit.

sparse.loading

A p-by-p sparse orthogonal matrix. If it is supplied, support.size would be omit.

seed

random seed. Default: seed = 1.

Details

The methods for generating the matrix is detailedly described in the APPENDIX A: Data generation Section in Schipper et al (2021).

Value

A list object comprising:

x

An n-by-p matrix.

coef

The sparse loading matrix used to generate x.

support.size

A vector recording the number of non-zero entries in each .

References

Model selection techniques for sparse weight-based principal component analysis. de Schipper, Niek C and Van Deun, Katrijn. Journal of Chemometrics. 2021. doi: 10.1002/cem.3289.


[Package abess version 0.4.6 Index]