createRCMData: Simulate data from RCM

Description Usage Arguments Value Author(s) Examples

View source: R/RCM.R

Description

Generate data from the hierarchical random covariance model (RCM).

Usage

1
createRCMData(ns, psi, nu, sigma)

Arguments

ns

A numeric vector giving the sample sizes in each study.

psi

The underlying Psi parameter which is the mean covariance matrix. If nu is Inf this is used as Sigma parameter in all Wishart distributions.

nu

A numeric of length one giving the underlying nu parameter.

sigma

A numeric matrix giving the expected covariance matrix. Can be supplied instead of psi.

Value

A list of matrices of the same size as psi giving observed scatter matrices from the RCM.
The realized covariance matrices are appended as an attribute.

Author(s)

Anders Ellern Bilgrau <anders.ellern.bilgrau (at) gmail.com>

Examples

1
2
3
4
5
6
ns <- c(20, 10)
psi <- diag(3)
createRCMData(ns, psi, nu = 10)

createRCMData(ns, psi, nu = 1e20)
createRCMData(ns, psi, nu = Inf)

AEBilgrau/correlateR documentation built on Nov. 15, 2019, 9:21 a.m.