Learn R Programming

sensitivity (version 1.2)

compute: Computation Of Sensitivity Indices

Description

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).

Usage

compute(sa, y = NULL)

Arguments

sa
The sensitivity analysis object.
y
The response.

Value

  • compute doesn't return anything, but it stores the results into the sa variable (it modifies its argument).

Details

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.

See Also

sensitivity

Examples

Run this code
# 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)

Run the code above in your browser using DataLab