R/generate.spc.matrix.R
generate.spc.matrix.Rd
Generate simulated matrix that its principal component are sparse linear combination of its columns.
generate.spc.matrix(
n,
p,
support.size = 3,
snr = 20,
sigma = NULL,
sparse.loading = NULL,
seed = 1
)
The number of observations.
The number of predictors of interest.
A integer specify the number of non-zero entries in the first column of loading matrix.
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.
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.
A p
-by-p
sparse orthogonal matrix.
If it is supplied, support.size
would be omit.
random seed. Default: seed = 1
.
A list
object comprising:
An \(n\)-by-\(p\) matrix.
The sparse loading matrix used to generate x.
A vector recording the number of non-zero entries in each .
The methods for generating the matrix is detailedly described in the APPENDIX A: Data generation Section in Schipper et al (2021).
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 .