plot_samplesim: Plot samplesim simulation results

Description Usage Arguments Details See Also Examples

View source: R/plot_samplesim.R

Description

This plot function is a graphical representation of the effects of sample size on estimates and precision of stable isotope mixing solutions. Two plots are currently available: a plot for the width of the credible interval and one for the median of the posterior distribution, both displayed for each sample size and each source.

Usage

1
plot_samplesim(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.

Details

This plot function automatically loads results data stored by the samplesim() function from the simulation name. It produces two plots. The first plot presents the width of the credible interval displayed for each sample size and each source. The second represents the median of the posterior distribution for each sample size and each source.

See Also

samplesim(), get_output(), plot_isospace()

Examples

1
2
3
4
5
## Not run: 
## Please visit the vignette available at: 
## https://ahasverus.github.io/samplesim/articles/samplesim.html

## End(Not run)

ahasverus/samplesim documentation built on July 8, 2021, 11:03 a.m.