analysis.sensitivity {multisensi} | R Documentation |
Runs a series of sensitivity analyses by a function from the sensitivity package
Description
The analysis.sensitivity
function runs a series of sensitivity analyses on the columns of a data.frame, using a method implemented in the sensitivity package.
Usage
analysis.sensitivity(Y, plan, nbcomp = 2, sigma.car = NULL,
analysis.args = list(keep.outputs = FALSE))
Arguments
Y |
a data.frame of output variables or principal components. |
plan |
an object containing the design. It must be created by a function from the sensitivity package with argument |
nbcomp |
the number of |
sigma.car |
NULL or sum of squares of Y. If not NULL, compute the Generalised Sensitivity Indices (saved in the last column of the data.frame mSI/tSI/iSI outputs. |
analysis.args |
a list of arguments. If it contains |
Details
The argument plan
must be an object created by a method implemented in the sensitivity package. Thus it belongs to a class such as morris
or fast99
. The name of the class is stored in the element call.info$fct
of the output returned by analysis.sensitivity
.
Value
A list containing:
SI |
data.frame of sensitivity indices or other importance measures returned by the function from the sensitivity package used. Sometimes empty but kept for compatibility reasons. |
mSI |
data.frame of first-order sensitivity indices |
tSI |
data.frame of total sensitivity indices |
iSI |
data.frame of interaction sensitivity indices |
inertia |
empty (kept for compatibility reasons) |
indic.fact |
0-1 matrix to indicate the factors associated with each factorial effect |
Hpredict |
empty (kept for compatibility reasons) |
outputkept |
if |
call.info |
list with first element |
Examples
# Test case : the Winter Wheat Dynamic Models (WWDM)
library(sensitivity) # to use fast99
# input factors design
data(biomasseX)
# input climate variable
data(Climat)
# example of the sensitivity:fast99 function
# design
newplan <- fast99(model = NULL, factors = names(biomasseX), n = 100,
q = "qunif", q.arg = list(list(min = 0.9, max = 2.8),
list(min = 0.9, max = 0.99),
list(min = 0.6, max = 0.8),
list(min = 3, max = 12),
list(min = 0.0035, max = 0.01),
list(min = 0.0011, max = 0.0025),
list(min = 700, max = 1100)))
# simulations
wwdm.Y <- simulmodel(model=biomasse, plan=newplan$X, climdata=Climat)
# analysis
res <- analysis.sensitivity(data.frame(wwdm.Y), plan=newplan, nbcomp=4)