simCov: Simulates a covariance matrix for an LD block

Description Usage Arguments Details Value

View source: R/utils.R View source: R/utils.R

Description

Simulates a covariance matrix for an LD block

Usage

1
2
3
simCov(config, limitZ = 1)

simCov(config, limitZ = 1)

Arguments

config

An object created by setConfiguration

config

An object created by setConfiguration

Details

Covariance matrix is drawn from Wishart distribution using the rWishart function. The most important parameter to simulate a covariance matrix is the "population" covariance matrix specified in the configuration object. This function also ensures that the resulting covariance matrix is positive definite using the nearPD function from the matrix package.

Value

a matrix representing the LD of the block


weinstockj/gwassim documentation built on May 4, 2019, 4:18 a.m.