getCorMat: Create a correlation matrix.

Description Usage Arguments Details Value See Also Examples

Description

getCorMat returns a correlation matrix.

Usage

1
getCorMat(x, rho)

Arguments

x

An n x d matrix, where d is the dimension of the data.

rho

A vector of length d. Each value in rho should be between 0 and 1.

Details

This creates a correlation matrix, R, where

R_ij = ∏_{k = 1}^{d}ρ_k^{16≤ft( x_{ik} - x_{jk} \right)^2}

Value

An n x n correlation matrix

See Also

Other correlation and covariance functions: combineCorMats, getCovMat

Examples

1
2
3
4
5
n <- 10
d <- 2
x <- matrix(runif(n * d), nrow = n, ncol = d)
rho <- runif(d, 0, 1)
getCorMat(x, rho)

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