Description Usage Arguments Details Value Warning messages References Examples
sobolrec
implements a recursive version of the procedure introduced by Tissot & Prieur (2015) using two replicated nested designs. This function estimates either all firstorder indices or all closed secondorder indices at a total cost of 2*N model evaluations where N is the size of each replicated nested design.
1 2 3 4 5 6 7 8 9  sobolrec(model=NULL, factors, layers, order, precision, method=NULL, tail=TRUE, ...)
## S3 method for class 'sobolrec'
ask(x, index, ...)
## S3 method for class 'sobolrec'
tell(x, y = NULL, index, ...)
## S3 method for class 'sobolrec'
print(x, ...)
## S3 method for class 'sobolrec'
plot(x, ylim = c(0,1), ...)

model 
a function, or a model with a 
factors 
an integer giving the number of factors, or a vector of character strings giving their names. 
layers 
If 
order 
an integer specifying which indices to estimate: 
precision 
a vector containing:

tail 
a boolean specifying the method used to choose the number of levels of the orthogonal array (see "Warning messages"). 
method 
If
Set to 
x 
a list of class 
index 
an integer specifying the step of the recursion 
y 
the model response. 
ylim 
ycoordinate plotting limits. 
... 
any other arguments for 
For firstorder indices, layers
is a vector:
(s_1, ..., s_m)
specifying the number m of layers of the nested design whose respective size are given by:
s_1 * s_2 * ... * s_{k1}, for k=2, ...,m+1.
For closed secondorder indices, layers
directly specifies the size of all layers.
For each Sobol' index S the stopping criterion writes:
 S_{l1}S_{l}  < ε
This criterion is tested for the last l_0 steps (including the current one). ε and l_0 are respectively the target precision and the number of steps of the stopping criterion specified in precision
.
sobolrec
uses either an algebraic or an acceptrejet method
to construct the orthogonal arrays for the estimation of closed secondorder indices. The algebraic method is less precise than the acceptreject method but offers more steps when the number of factors
is small.
sobolrec
automatically assigns a uniform distribution on [0,1] to each input. Transformations of distributions (between U[0,1] and the wanted distribution) have to be performed before the call to tell().
sobolrec
returns a list of class "sobolrec"
, containing all
the input arguments detailed before, plus the following components:
call 
the matched call. 
X 
a 
y 
a list of the response used at each step. 
V 
a list of the model variance estimated at each step. 
S 
a list of the Sobol' indices estimated at each step. 
steps 
the number of steps performed. 
N 
the size of each replicated nested design. 
layers
is not the square of a prime number. It has been replaced by: "When order=2
, the value of layers
must be the square of a prime power number. This warning message indicates that it was not the case and the value has been replaced depending on tail
. If tail=TRUE
(resp. tail=FALSE
) the new value of layers
is equal to the square of the prime number preceding (resp. following) the square root of layers
.
layers
is not satisfying the constraint. It has been replaced by: "the value N for layers
must satisfied the constraint N ≥ (d1)^2 where d is the number of factors. This warning message indicates that N
was replaced by the square of the prime number following (or equals to) d1.
A.S. Hedayat, N.J.A. Sloane and J. Stufken, 1999, Orthogonal Arrays: Theory and Applications, Springer Series in Statistics.
L. Gilquin, E. Arnaud, H. Monod and C. Prieur, 2016, Recursive estimation procedure of Sobol' indices based on replicated designs, preprint available at: https://hal.inria.fr/hal01291769.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 
# Test case: the nonmonotonic Sobol gfunction
# The method of sobol requires 2 samples
# (there are 8 factors, all following the uniform distribution on [0,1])
# firstorder indices estimation
x < sobolrec(model = sobol.fun, factors = 8, layers=rep(2,each=15), order=1,
precision = c(5*10^(2),2), method=NULL, tail=TRUE)
print(x)
# closed secondorder indices estimation
x < sobolrec(model = sobol.fun, factors = 8, layers=11^2, order=2,
precision = c(10^(2),3), method="al", tail=TRUE)
print(x)
# Test case: dealing with external model
# put in comment because of bug with ask use !
#x < sobolrec(model = NULL, factors = 8, layers=rep(2,each=15), order=1,
# precision = c(5*10^(2),2), method=NULL, tail=TRUE)
#toy < sobol.fun
#k < 1
#stop_crit < FALSE
#while(!(stop_crit) & (k<length(x$layers))){
# ask(x, index=k)
# y < toy(x$block)
# tell(x, y, index=k)
# stop_crit < x$stop_crit
# k < k+1
#}
#print(x)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.