augment: Augment a covariance matrix.

Description Usage Arguments Value Examples

View source: R/combined.R

Description

Takes a valid k by k covariance matrix and produces a valid k+1 by k+1 covariance matrix, uniformly drawn from that set, with the upper k by k submatrix being the input. Currently implimented in both R and C++. The C++ version is faster while the R version is easier for the expected user base to read and modify as needed.

Usage

1
2
augment(covm, buff = sqrt(.Machine$double.eps))
augmentcpp(covm, buff = sqrt(.Machine$double.eps))

Arguments

covm

A valid k by k covariance matrix.

buff

numeric. A buffer to avoid numeric positive non-definiteness.

Value

A valid k by k covariance matrix.

Examples

1
2
3
  set.seed(1234)
  corm <- RandomCormCPP(5)
  augmentcpp(corm)

christophercschwarz/DOPE documentation built on April 10, 2020, 4:43 a.m.