Learn R Programming

sensitivity (version 1.3-1)

tell: Computation Of Sensitivity Indices When The Model Is External

Description

tell is used to tell a sensitivity analysis object the results of the simulations. It is used when the model is not given when parametring the sensitivity analysis (whith the model=NULL argument). For example, it is the case when the model is external to R.

Usage

tell(sa, y = NULL)

Arguments

sa
the sensitivity analysis object
y
the response

Value

  • tell doesn't return anything. It does the sensitivity analysis, and stores all the results in the variable sa.

Details

sa is an object returned by a sensitivity analysis function, such as srcpcc, morris, sobol,...y should be a numeric vector.

Examples

Run this code
# Example of the FAST method
# (one should note the call with model = NULL)

sa <- fast(model = NULL, factors = 8, n = 1000)

# 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:

tell(sa, y)
print(sa)

# Remark : because the model is a simple R function,
# this example is equivalent to :
sa <- fast(model = sobol.fun, factors = 8, n = 1000)

Run the code above in your browser using DataLab