LDS_rep: Multiple LDS replicates

Description Usage Arguments Value Examples

View source: R/stochastics.R

Description

Generate multiple stochastic time series from an LDS model. This is a convenient wrapper for one_LDS_rep.

Usage

1
2
3
4
5
6
7
8
9
LDS_rep(
  theta,
  u = NULL,
  v = NULL,
  years,
  num.reps = 100,
  mu = 0,
  exp.trans = TRUE
)

Arguments

theta

A list of parameters: A, B, C, D, Q, R, x0, v0

u

Input matrix for the state equation (m_u rows, T columns)

v

Input matrix for the output equation (m_v rows, T columns)

years

The years of the study horizon

num.reps

The number of stochastic replicates#'

mu

Mean of the log-transformed streamflow process

exp.trans

Whether exponential transformation back to the streamflow space is required. If TRUE, both Y and Q are returned, otherwise only Y.

Value

Same as one_LDS_rep, but the data.table consists of multiple replicates.

Examples

1
LDS_rep(theta, t(NPpc), t(NPpc), 1200:2012, num.reps = 10, mu = mean(log(NPannual$Qa)))

ntthung/ldsr documentation built on Aug. 28, 2020, 2:34 a.m.