compute {sensitivity} | R Documentation |
compute
is used to compute the sensitivity indices. It is a
generic function which means that each class of sensitivity analysis
overloads this function. When passing a model to the sensitivity
analysis function (such as linsa
), compute
is
automatically called. compute
is useful when the
model is external (see example).
compute(sa, y = NULL)
sa |
The sensitivity analysis object. |
y |
The response. |
sa
is an object returned by a sensitivity analysis function,
such as linsa
, morris
,
sobol
, sobol.sal02
or fast
.
y
should be a numeric
vector.
compute
doesn't return anything, but it stores the results into
the sa
variable (it modifies its argument).
# Example of the FAST method sa <- fast(model = NULL, factors = 8, n = 1000, nboot = 100) # at this stage, only the design of experiment (sa$x) was generated # the response is computed "manually": y <- sobol.fun(sa$x) # at this place could be a # call to an external code # then, the sensitivity analysis: compute(sa, y) print(sa)