timeseries2D generates a two-dimensional Langevin process using a
simple Euler integration. The drift function is a cubic polynomial, the
diffusion function a quadratic.
timeseries2D(
N,
startpointx = 0,
startpointy = 0,
D1_1 = matrix(c(0, -1, rep(0, 14)), nrow = 4),
D1_2 = matrix(c(0, 0, 0, 0, -1, rep(0, 11)), nrow = 4),
g_11 = matrix(c(1, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 3),
g_12 = matrix(c(0, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 3),
g_21 = matrix(c(0, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 3),
g_22 = matrix(c(1, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 3),
sf = 1000,
dt = 0
)timeseries2D returns a time-series object with the generated
time-series as columns.
a scalar denoting the length of the time-series to generate.
a scalar denoting the starting point of the time series x.
a scalar denoting the starting point of the time series y.
a 4x4 matrix denoting the coefficients of D1 for x.
a 4x4 matrix denoting the coefficients of D1 for y.
a 3x3 matrix denoting the coefficients of g11 for x.
a 3x3 matrix denoting the coefficients of g12 for x.
a 3x3 matrix denoting the coefficients of g21 for y.
a 3x3 matrix denoting the coefficients of g22 for y.
a scalar denoting the sampling frequency.
a scalar denoting the maximal time step of integration. Default
dt=0 yields dt=1/sf.
Philip Rinn
The elements \(a_{ij}\) of the matrices are defined by the corresponding equations for the drift and diffusion terms:
$$D^1_{1,2} = \sum_{i,j=1}^4 a_{ij} x_1^{(i-1)}x_2^{(j-1)} $$
with \(a_{ij} = 0\) for \( i + j > 5\).
$$g_{11,12,21,22} = \sum_{i,j=1}^3 a_{ij} x_1^{(i-1)}x_2^{(j-1)} $$
with \(a_{ij} = 0\) for \( i + j > 4\)
timeseries1D