Learn R Programming

CovTools (version 0.5.6)

samplecovs: Generate Sample Covariances of 2 groups

Description

For visualization purpose, samplecovs generates a 3d array of stacked sample covariances where - in 3rd dimension, the first half are sample covariances of samples generated independently from normal distribution with identity covariance, where the latter half consists of samples covariances from dense random population covariance.

Usage

samplecovs(ncopy, size)

Value

a \((p\times p\times ncopy)\) array of strictly positive definite sample covariances.

Arguments

ncopy

the total number of sample covariances to be generated.

size

dimension \(p\).

Examples

Run this code
## generate total of 20 samples covariances of size 5-by-5.
samples <- samplecovs(20,5)


Run the code above in your browser using DataLab