Description Usage Arguments Value Methods (by generic) Slots References Examples
An S4 class to return the results of sensitivity analyses
Plots pcSobol S4 object
1 2 3 4 5 6 7 8 9 10 |
x |
The result slot of an object created by |
... |
ignored |
object |
S4 pcSA object |
outcome_var |
Optional character vector for labeling the outcome variable in the plot. Default is "Outcome". |
legend_pos |
Character vector that sets the position of the legend to one of: "topright", "bottomright", "bottomleft", or "topleft". |
ptype |
Optional Character vector for first order, total, or all effects c("all", "fo", "total"). |
Returns a ggplot2 plot.
print
: An S4 method for printing a pcSobol S4 object
show
: An S4 method for showing a pcSobol S4 object
plot
: Plot First-Order (Main) Effects and Total Effects from a Sobol Sensitivity
Analysis of a Simulation Model in the Same Plot
This is function of the eat package. sobol_sa
conducts a
global variance decomposition, and then this can be used to plot it.
call
Language from the call of the function.
result
sobol2007 s3 class from sensitivity
package.
timing
Numeric vector length one with the total elapsed time it took to execute.
session
the results from calling sessionInfo()
at end of
pc_sa
function.
J. C. Thiele, W. Kurth, V. Grimm, Facilitating Parameter Estimation and Sensitivity Analysis of Agent-Based Models: A Cookbook Using NetLogo and R. Journal of Artificial Societies and Social Simulation. 17, 11 (2014).
1 2 3 4 5 6 7 8 9 10 11 | fake_abm <- function(params, out) {
x1 <- params[1]
x2 <- params[2]
if (out=="sq") return(x1^2 + x2 + rnorm(1, 0))
if (out=="ident") return(x1 + x2 + rnorm(1, 0))
}
inputs <- lapply(list(param1 = NA, param2 = NA),
function(x) list(random_function = "qunif",
ARGS = list(min = 0, max = 1)))
s <- sobol_sa(fake_abm, inputs, "sq")
plot(s)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.