An example of sensitivity package is shown below, how I will implement shapleyPermEx with my data.
Xall <- function(n) matrix(runif(d*n,-pi,pi),nc=d)
Xset <- function(n, Sj, Sjc, xjc) matrix(runif(n*length(Sj),-pi,pi),nc=length(Sj))
library(sensitivity)
x <- shapleyPermEx(model = ishigami.fun, Xall=Xall, Xset=Xset, d=d, Nv=1e4, No = 1e3, Ni = 3)
print(x)
plot(x)
My data is as follows:
x1 <- rnorm(20,14,13)
x2 <- rnorm(20,20,22)
x3 <- rnorm(20,8,6)
y <- x1*sin(x2)+x2*x3-cos(x1)*x1-3
How do I convert my data to a format suitable for Xall and Xset? Thanks in advance!