Description Usage Arguments Value Methods (by generic) Slots References Examples
An S4 class to return the results of sensitivity analyses
Show
Plots pcSA S4 object, a Partial Correlation Analysis of a Simulation Model
1 2 3 4 5 6 7 8 9 |
x |
The result slot of an object created by |
... |
ignored @export |
object |
S4 pcSA object @export |
outcome_var |
Optional character vector for labeling the outcome variable in the plot. Default is "Outcome". |
xlab |
Optional character vector for labeling the variables. |
ylab |
Optional character vector. Default is "Partial Rank Correlation Coefficient". Could also be "Partial Correlation Coefficient", "Standardized Rank Regression Coefficient", and "Standardized Regression Coefficient". |
Returns a ggplot2 plot.
print: An S4 method for printing a pcSA S4 object
show: An S4 method for showing a pcSA S4 object
plot: This is function of the eat package. pc_sa conducts a a
partial correlation analysis.
callLanguage from the call of the function.
input_setdata.frame of input set used
simsnumeric vector with outcome of simulating model with input_set
resultc("src", "pcc") s3 classes from sensitivity package.
r_squaredNumeric vector length one.
rmseNumeric vector length one.
timingNumeric vector length one with the total elapsed time it took to execute.
sessionthe 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 <- pc_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.