simDAdata: Simulate data to demonstrate the Bayesian statistical model

Description Usage Arguments Value Author(s) Examples

View source: R/simDAdata.R

Description

This function simulates the ensemble of the measured variable, model outputs for the measured variable under different forcing scenarios, and model outputs for the measured variable without any external forcing scenario.

Usage

1
2
simDAdata(n = 30, N = 10, m = 3, Lj = c(5, 3, 7), L0 = 8,
  trend = 30)

Arguments

n

an integer containing the number of spatial grid cells over the globe

N

an integer containing number of ensemble members for measured variable

m

an integer containing the number of forcing scenarios

Lj

a vector containing the number of model control runs under each forcing scenarios

L0

an integer containing the number of model control runs without any external forcing

trend

trend of the simulated data for the ensemble of the measured variable with default value 30

Value

a list of 3 elements containing an n by N matrix of the ensemble of the measured variable, an n by m matrix of model outputs for measured variable under m forcing scenarios, and an n by L0 matrix of model control runs for measured variable without any external forcing scenario

Author(s)

Pulong Ma <mpulong@gmail.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
n <- 30
N <- 10
m <- 3
Lj <- c(5, 3, 7)
L0 <- 8
trend <- 30
DAdata <- simDAdata(n, N, m, Lj, L0, trend)
# ensembles of the measured variable
y <- DAdata[[1]]
# model outputs for the measured variable under different forcing scenarios
x <- DAdata[[2]]
# model outputs for the measured variable without any external forcing scenario
x0 <- DAdata[[3]]

mapn/DAbayes documentation built on May 21, 2019, 11:26 a.m.