Learn R Programming

EcoEnsemble (version 1.1.2)

EnsembleData: Constructor for the EnsembleData class

Description

A constructor for the EnsembleData class. This is used to convert input data into the required form for fit_ensemble_model.

Usage

EnsembleData(observations, simulators, priors, drivers = FALSE, MMod)

Value

An object of class EnsembleData

Arguments

observations

A list of length 2 containing observations and a covariance matrix. The first element is a data.frame or matrix with each column giving observations of each output of interest and each row a time. Rows should be named with the times and columns should be named the variables. The second element is is a \(d \times d\) matrix where \(d\) is the number of columns of the observations data frame / matrix. This matrix is the covariance matrix of the observations.

simulators

A list with length equal to the number of simulators. For each simulator, there is a list of 2 objects containing the simulator output and covariance matrix. The first element is a data.frame or matrix with each column giving a simulator outputs of interest and each row a time. Rows should be named with the times and columns should be named the variables. The second element is a \(n_k \times n_k\) matrix where \(n_k\) is the number of columns of the simulators output data frame / matrix. This matrix is the covariance matrix of the simulator outputs.

priors

An EnsemblePrior object specifying the prior distributions for the ensemble.

drivers

A logical indicating whether drivers have been used in combination with simulators. Default value is FALSE.

MMod

Not currently implemented.

See Also

EnsembleData, EnsemblePrior, fit_ensemble_model

Examples

Run this code
ensemble_data <- EnsembleData(observations = list(SSB_obs, Sigma_obs),
                             simulators = list(list(SSB_ewe, Sigma_ewe, "EwE"),
                                           list(SSB_fs,  Sigma_fs, "FishSUMS"),
                                           list(SSB_lm,  Sigma_lm, "LeMans"),
                                           list(SSB_miz, Sigma_miz, "mizer")),
                              priors = EnsemblePrior(4))

Run the code above in your browser using DataLab