one_LDS_rep {ldsr} | R Documentation |
One LDS replicate
Description
Generate a single stochastic time series from an LDS model
Usage
one_LDS_rep(
rep.num,
theta,
u = NULL,
v = NULL,
years,
mu = 0,
exp.trans = TRUE
)
Arguments
rep.num |
The ID number of the replicate |
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 |
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
A data.table. The first column is the years of the study horizon, as supplied by year
.
Subsequent columns are simX
, simY
, and simQ
which are the simulated catchment state (X),
log-transformed and centralized flow (Y) and flow (Q). The last column is the replicate ID number.
Examples
# Learn theta
one_LDS_rep(1, theta, t(NPpc), t(NPpc), 1200:2012, mu = mean(log(NPannual$Qa)))
[Package ldsr version 0.0.2 Index]