morris {sensitivity} | R Documentation |
morris
implements the Morris's elementary effects screening
method (Morris 1992). This method, based on design of experiments,
allows to identify the few important factors at a cost of r * (p + 1) simulations (where p is the number
of factors). This implementation includes some improvements of the
original method: space-filling optimization of the design (Campolongo
et al. 2007) and simplex-based design (Pujol 2008).
morris(model = NULL, factors, r, design, binf = 0, bsup = 1, scale = TRUE, ...) ## S3 method for class 'morris': tell(x, y = NULL, ...) ## S3 method for class 'morris': print(x, ...) ## S3 method for class 'morris': plot(x, identify = FALSE, ...) plot3d.morris(x, alpha = c(0.2, 0), sphere.size = 1)
model |
a function, or a model with a predict method,
defining the model to analyze. |
factors |
an integer giving the number of factors, or a vector of character strings giving their names. |
r |
either an integer giving the number of repetitions of the design,
i.e. the number of elementary effect computed per factor, or a
vector of two integers c(r1, r2) for the space-filling
improvement (Campolongo et al.). In this case, r1 is the
wanted design size, and r2 (> r1 )
is the size of the (bigger) population in which is extracted the
design (this can throw a warning, see below).
|
design |
a list specifying the design type and its
parameters:
|
binf |
either an integer, specifying the minimum value for the factors, or a vector for different values for each factor. |
bsup |
either an integer, specifying the maximum value for the factors, or a vector for different values for each factor. |
scale |
logical. If TRUE , the input and output data are
scaled before computing the elementary effects. |
x |
a list of class "morris" storing the state of the
screening study (parameters, data, estimates). |
y |
a vector of model responses. |
identify |
logical. If TRUE , the user selects with the
mouse the factors to label on the (mu*, sigma)
graph (see identify ). |
... |
any other arguments for model which are passed
unchanged each time it is called. |
alpha |
a vector of three values between 0.0 (fully transparent) and 1.0
(opaque) (see rgl.material ). The first value is for the
cone, the second for the planes. |
sphere.size |
a numeric value, the scale factor for displaying the spheres. |
plot2d
draws the (mu*, sigma) graph.
plot3d.morris
draws the (mu, mu*,
sigma) graph (requires the rgl package). On this graph, the
points are in a domain bounded by a cone and two planes (application
of the Cauchy-Schwarz inequality).
morris
returns a list of class "morris"
, containing all
the input argument detailed before, plus the following components:
call |
the matched call. |
X |
a data.frame containing the design of experiments. |
y |
a vector of model responses. |
ee |
a r * p matrix of elementary effects for all the factors. |
Notice that the statitics of interest (mu, mu*
and sigma) are not stored. They can be printed by the
print
method, but to extract numerical values, one has to
compute them with the following instructions:
mu <- apply(x$ee, 2, mean) mu.star <- apply(x$ee, 2, function(x) mean(abs(x))) sigma <- apply(x$ee, 2, sd)
M. D. Morris, 1991, Factorial sampling plans for preliminary computational experiments, Technometrics, 33, 161–174.
F. Campolongo, J. Cariboni and A. Saltelli, 2007, An effective screening design for sensitivity, Environmental Modelling & Software, 22, 1509–1518.
G. Pujol (2008), Simplex-based screening designs for estimating metamodels, submited to Reliability Engineering and System Safety.
# Test case : the non-monotonic function of Morris x <- morris(model = morris.fun, factors = 20, r = 4, design = list(type = "oat", levels = 5, grid.jump = 3)) print(x) plot(x) ## Not run: morris.plot3d(x) # (requires the package 'rgl')