Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

analyze_nl

Analyze NetLogo simulation output


Description

Analyze NetLogo simulation output

Usage

analyze_nl(nl, metrics = getexp(nl, "metrics"), funs = list(mean = mean))

Arguments

nl

nl object

metrics

vector of strings defining metric columns for evaluation. Defaults to metrics of the experiment within the nl object

funs

list with the summary metrics for the sensitivity results

Details

The analyze_nl function runs basic analyses on NetLogo simulation output. In order to execute this function, simulation output needs to be attached to the simdesign first with setsim(nl, "output") <- results.

analyze_nl calls different post-processing analysis functions, depending on the specified method in the simdesign object of the nl object.

The following simdesign are currently supported:

Calls analyze_ff. The function calculates aggregated output metrics by dropping random seeds and aggregating values with the provided functions.

Calls analyze_lhs. The function calculates aggregated output metrics by dropping random seeds and aggregating values with the provided functions.

Calls analyze_sobol. The function calculates sobol sensitivity indices from the output results using the sensitivity package.

Calls analyze_sobol2007. The function calculates sobol sensitivity indices from the output results using the sensitivity package.

Calls analyze_soboljansen. The function calculates sobol sensitivity indices from the output results using the sensitivity package.

Calls analyze_morris. The function calculates morris sensitivity indices from the output results using the sensitivity package.

Calls analyze_eFast. The function calculates eFast sensitivity indices from the output results using the sensitivity package.

For the following simdesign no postprocessing analysis function has been implemented yet:

Value

analysis summary tibble

Examples

# Load nl object including output data from testdata
nl <- nl_sobol

# Define aggregation measurements:
myfuns <- list(mean=mean, sd=sd, min=min, max=max)

# Calculate sensitivity indices:
analyze_nl(nl, funs = myfuns)

nlrx

Setup, Run and Analyze 'NetLogo' Model Simulations from 'R' via 'XML'

v0.4.2
GPL-3
Authors
Jan Salecker [aut, cre] (<https://orcid.org/0000-0002-9000-4229>), Marco Sciaini [aut] (<https://orcid.org/0000-0002-3042-5435>), Marina Papadopoulou [rev] (Marina reviewed the package for ropensci, see <https://github.com/ropensci/software-review/issues/262>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.