powered by
Generate population covariance matrix with dimension p.
gen.cov.mat(p, sigma2, type)
A numeric p-by-p matrix.
numeric
A integer scalar of dimensionality.
integer
A positive numeric scalar representing the variance of each entry.
Specify the type of a covariance matrix: Diagonal structure ("diagonal"); Equal correlation structure ("equal"); Power decay structure ("power").
Haotian Xu
gen.cov.mat(p = 5, sigma2 = 1, type = "diagonal")
Run the code above in your browser using DataLab