rcov_mat: Generate a random covariance matrix

Description Usage Arguments Value

View source: R/cov_mat_generators.R

Description

Generates a random correlation matrix by R rcor_mat, then scales it to a covariance matrix by CRC, where C is a diagonal matrix of uniformly generated standard deviations in a specified range.

Usage

1
rcov_mat(d, k0 = d, range_sd = c(0.2, 5), ...)

Arguments

d

An integer specifying the dimension of the correlation matrix.

k0

An integer. d - k0 are the number of independent dimensions.

range_sd

A vector of length 2 specifying the lower and upper bound of the uniform distribution for generating standard deviations.

...

Other arguments to rcor_mat.

Value

A covariance matrix with an attribute 'which_dims_cor', indicating which dimensions that are the correlated ones.


Tveten/tpca documentation built on June 10, 2021, 8:43 p.m.