# Test case : the non-monotonic Sobol g-function
# The method of sobol requires 2 samples
# There are 8 factors, all following the uniform distribution
# on [0,1]
n <- 1000
x <- data.frame(matrix(nr = 2 * n, nc = 8))
for (i in 1:8)
x[, i] <- runif(2 * n)
# sensitivity analysis
sa <- sobol(model = sobol.fun, x1 = x[1:n,], x2 = x[(n+1):(2*n),], max.order = 2, nboot = 100)
print(sa)
#plot(sa)
Run the code above in your browser using DataLab