corr_gauss_matrix_armaC {GauPro} | R Documentation |
Correlation Gaussian matrix in C using Armadillo
Description
20-25
Usage
corr_gauss_matrix_armaC(x, y, theta, s2 = 1)
Arguments
x |
Matrix x |
y |
Matrix y, must have same number of columns as x |
theta |
Theta vector |
s2 |
Variance to multiply matrix by |
Value
Correlation matrix
Examples
corr_gauss_matrix_armaC(matrix(c(1,0,0,1),2,2),matrix(c(1,0,1,1),2,2),c(1,1))
x1 <- matrix(runif(100*6), nrow=100, ncol=6)
x2 <- matrix(runif(1e4*6), ncol=6)
th <- runif(6)
t1 <- corr_gauss_matrixC(x1, x2, th)
t2 <- corr_gauss_matrix_armaC(x1, x2, th)
identical(t1, t2)
# microbenchmark::microbenchmark(corr_gauss_matrixC(x1, x2, th),
# corr_gauss_matrix_armaC(x1, x2, th))
[Package GauPro version 0.2.12 Index]