logDet: Calculate the log of the determinant of a matrix.

Description Usage Arguments Details Value Examples

Description

logDet returns the log of the determinant of a matrix..

Usage

1

Arguments

C

An n x n covariance matrix.

Details

This calculates the log of the determinant of a matrix. In the bcgp setting, C is a covariance matrix resulting from getCovMat.

Value

A scalar

Examples

1
2
3
4
5
6
7
8
9
n <- 10
d <- 2
x <- matrix(runif(n * d), nrow = n, ncol = d)
rho <- runif(d, 0, 1)
R <- getCorMat(x, rho)
sig2 <- 0.01
V <- rlnorm(n, -0.1, 0.1)
C <- getCovMat(V, R, sig2)
logDet(C)

cbdAmgen/bcgp0a documentation built on May 17, 2019, 10:01 a.m.