run_bayes: Run all the Bayesian analysis on a list of scenarios

Description Usage Arguments Details Value TODO

View source: R/bayesian.R

Description

The assumption is that the scenarios have already been run. The best way to arrange this is to use the return value of run_ensemble as the argument to this function

Usage

1
2
3
4
5
6
7
run_bayes(
  aScenarioList,
  years = NULL,
  landtypes = NULL,
  lpdf = get_lpdf(1),
  lprior = uniform_prior
)

Arguments

aScenarioList

List of ScenarioInfo structures

years

Vector of years to filter observations to (default is to use all available years)

landtypes

Vector of land types to filter observations to (default is to use all available land types)

lpdf

Log probability density function (q.v. get_lpdf)

lprior

Log prior function (q.v. calc_prior).

Details

The years and landtypes arguments can be use to restrict the observations that will be used in the analysis. The regions are always filtered to excatly the regions that are included in the ScenarioInfo structures.

Typically log-probaility density functions are parameterized with a parameter (conventionally called σ) that describes how quickly the probability density falls off as the discrepancy between the model outputs and observed data grows. We use a slightly modified version of this convention. Because we look at a variety of different land use types, each of which can have completely different scale. Therefore, we let each land use type have its own σ value. We tie these values together using a single parameter ξ, which represents the fraction of the total variance of the observed values for a land use type that is allocated to that land use's σ. In other words, for a land type i, with observations O_i,

σ^2_i = ξ \var(O_i).

A single call to run_bayes will produce posteriors for a range of ξ values, by default ξ = 0.1 … 1.0 in steps of 0.1.

Value

Modified list of ScenarioInfo structures with the Bayesian calculation tables populated.

TODO


JGCRI/gcamland documentation built on Oct. 6, 2020, 5:30 p.m.