plot.EnsembleSample {EcoEnsemble}R Documentation

Plot the ensemble output

Description

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

Usage

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

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.

Value

The ggplot object.

Examples


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")


[Package EcoEnsemble version 1.1.2 Index]