getCorMatR: Create a correlation matrix.

Description Usage Arguments Details Value See Also Examples

View source: R/getCoxMatsR.R

Description

getCorMatR returns a correlation matrix.

Usage

1
getCorMatR(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: combineCorMatsR, getCovMatNSR, getCovMatSR

Examples

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

cbdavis33/bcgp documentation built on Oct. 1, 2019, 8:07 a.m.