Learn R Programming

cds (version 1.0.4)

rcovmat: Construct a Structured Covariance Matrix for Simulations

Description

Construct a low-rank covariance matrix with specified eigenvalues, where the eigenvectors are simulated from uniform distributions.

Usage

rcovmat(
  eigs = k:1,
  m = 10,
  k = 2,
  perc = list(c(0.4, 0.2, 0.4), c(0.2, 0.4, 0.4)),
  limits = list(l1 = c(0.5, 1), l2 = c(-1, -0.5), l3 = c(-0.1, 0.1)),
  random = TRUE
)

Arguments

eigs

Vector of $k$ eigenvalues.

m

Integer; the number of rows and columns of the matrix.

k

Integer; the rank of the matrix.

perc

List of $k$ vectors giving the sampling proportions for the uniform sampling of the eigenvectors, for each dimension.

limits

List of length 2 vectors, one for each uniform sample, giving the lower and upper bounds of the uniform distribution.

random

Logical; randomize the order of the loading per dimension or not.