Langevin2D {Langevin}R Documentation

Calculate the Drift and Diffusion of two-dimensional stochastic processes

Description

Langevin2D calculates the Drift (with error) and Diffusion matrices for given time series.

Usage

Langevin2D(
  data,
  bins,
  steps,
  sf = ifelse(is.mts(data), frequency(data), 1),
  bin_min = 100,
  reqThreads = -1
)

Arguments

data

a matrix containing the time series as columns or a time-series object.

bins

a scalar denoting the number of bins to calculate Drift and Diffusion on.

steps

a vector giving the \tau steps to calculate the moments (in samples).

sf

a scalar denoting the sampling frequency (optional if data is a time-series object).

bin_min

a scalar denoting the minimal number of events per bin. Defaults to 100.

reqThreads

a scalar denoting how many threads to use. Defaults to -1 which means all available cores.

Value

Langevin2D returns a list with nine components:

D1

a tensor with all values of the drift coefficient. Dimension is bins x bins x 2. The first bins x bins elements define the drift D^{(1)}_{1} for the first variable and the rest define the drift D^{(1)}_{2} for the second variable.

eD1

a tensor with all estimated errors of the drift coefficient. Dimension is bins x bins x 2. Same expression as above.

D2

a tensor with all values of the diffusion coefficient. Dimension is bins x bins x 3. The first bins x bins elements define the diffusion D^{(2)}_{11}, the second bins x bins elements define the diffusion D^{(2)}_{22} and the rest define the diffusion D^{(2)}_{12} = D^{(2)}_{21}.

mean_bin

a matrix of the mean value per bin. Dimension is bins x bins x 2. The first bins x bins elements define the mean for the first variable and the rest for the second variable.

density

a matrix of the number of events per bin. Rows label the bin of the first variable and columns the second variable.

M1

a tensor of the first moment for each bin (line label) and each \tau step (column label). Dimension is bins x bins x 2length(steps).

eM1

a tensor of the standard deviation of the first moment for each bin (line label) and each \tau step (column label). Dimension is bins x bins x 2length(steps).

M2

a tensor of the second moment for each bin (line label) and each \tau step (column label). Dimension is bins x bins x 3length(steps).

U

a matrix of the bin borders

Author(s)

Philip Rinn

See Also

Langevin1D


[Package Langevin version 1.3.1 Index]