Correlation Gaussian matrix in C using Armadillo
20-25
corr_gauss_matrix_armaC(x, y, theta, s2 = 1)
x |
Matrix x |
y |
Matrix y, must have same number of columns as x |
theta |
Theta vector |
s2 |
Variance to multiply matrix by |
Correlation matrix
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))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.