This function imports samplesim simulation results. More specifically it loads the median and width of credible intervals.

get_output(name, path = ".", change = FALSE, reference = NULL)

Arguments

name

a character of length 1 giving the name of the simulation. If NULL (default) the simulation will be named by the time of the simulation. This name will serve to create a directory in which results will be stored.

path

a character string of length 1. The directory to save results. This directory must exist and can be an absolute or a relative path. Default is the current working directory.

change

a logical value. If TRUE values are expressed as a percentage of change compared to a reference. Default is FALSE.

reference

an integer. The reference state to compute percentage of change. If NULL (default) the minimum value of sample size will be used.

Value

A data frame with five columns:

  • source: the source name.

  • size: the sample size.

  • replicate: the number of replicate.

  • value: the value of medians/widths of credible intervals.

  • type: the label of value (i.e. medians or widths)

If change = TRUE, then the column replicate is omitted and results are aggregated over replicates.

See also

Examples

if (FALSE) { ## Please visit the vignette available at: ## https://ahasverus.github.io/samplesim/articles/samplesim.html }