# NOT RUN {
## 1D Example - 1
n = 5; d = 1;
set.seed(3);
library(lhs);
x = maximinLHS(n,d);
beta = rnorm(1);
R = corr_matrix(x,beta);
print(R)
## 1D Example - 2
beta = rnorm(1)
R = corr_matrix(x,beta,corr = list(type = "matern"))
print(R)
## 2D example - 1
n = 10; d = 2;
set.seed(2);
library(lhs);
x = maximinLHS(n,d);
beta = rnorm(2);
R = corr_matrix(x,beta,corr = list(type = "exponential", power = 2));
print(R)
## 2D example - 2
beta = rnorm(2)
R = corr_matrix(x,beta,corr = list(type = "matern", nu = 5/2))
print(R)
# }
Run the code above in your browser using DataLab