
Last chance! 50% off unlimited learning
Sale ends in
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.
analysis.sensitivity(Y, plan, nbcomp = 2, sigma.car = NULL,
analysis.args = list(keep.outputs = FALSE))
a data.frame of output variables or principal components.
an object containing the design. It must be created by a function from the sensitivity package with argument model=NULL
.
the number of Y
variables to analyse (the first nbcomp
variables of Y
will be analysed).
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.
a list of arguments. If it contains keep.outputs=TRUE
, the outputs associated with the analysis of each variable are returned (see section Value
).
A list containing:
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.
data.frame of first-order sensitivity indices
data.frame of total sensitivity indices
data.frame of interaction sensitivity indices
empty (kept for compatibility reasons)
0-1 matrix to indicate the factors associated with each factorial effect
empty (kept for compatibility reasons)
if analysis.args$keep.outputs=TRUE
, list of the outputs returned by the sensitivity analysis performed on each variable
list with first element analysis="sensitivity"
and second element fct
storing the class name of the argument plan
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
.
# NOT RUN {
# 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)
# }
Run the code above in your browser using DataLab