Learn R Programming

EcoEnsemble (version 1.1.2)

plot.EnsembleSample: Plot the ensemble output

Description

Plots the latent variables predicted by the ensemble model, along with simulator outputs and observations.

Usage

# S3 method for EnsembleSample
plot(x, variable = NULL, quantiles = c(0.05, 0.95), ...)

Value

The ggplot object.

Arguments

x

An EnsembleSample object.

variable

The name of the variable to plot. This can either be a character string in the same form as the observation variable, or an index for the column in the observations data frame.

quantiles

A numeric vector of length 2 giving the quantiles for which to plot ribbons if doing a full sampling of the ensemble model. The default is c(0.05,0.95).

...

Other arguments passed on to methods. Not currently used.

Examples

Run this code
# \donttest{
priors <- EnsemblePrior(4)
prior_density <- prior_ensemble_model(priors, M = 4)
samples <- sample_prior(observations = list(SSB_obs, Sigma_obs),
             simulators = list(list(SSB_miz, Sigma_miz),
                               list(SSB_ewe, Sigma_ewe),
                               list(SSB_fs, Sigma_fs),
                               list(SSB_lm, Sigma_lm)),
             priors = priors,
             sam_priors = prior_density)
plot(samples) #Plot the prior predictive density.
plot(samples, variable="Herring")
# }

Run the code above in your browser using DataLab