Skip to contents

Algorithms for solve() on SDE problems with weak (distributional) order 2 or 1, as in StochasticDiffEq. They match the moments of the solution rather than its path, and replace the Brownian increments by discrete random variables.

Usage

DRI1()

RI1()

RI3()

RI5()

RI6()

RDI2WM()

RDI3WM()

RDI4WM()

RDI1WM()

RS1()

RS2()

PL1WM()

PL1WMA()

COM()

SIEA()

SIEB()

SMEA()

SMEB()

W2Ito1()

DRI1NM()

NON()

NON2()

IRI1(
  autodiff = NULL,
  concrete_jac = NULL,
  linsolve = NULL,
  nlsolve = NULL,
  extrapolant = "constant",
  theta = 1,
  new_jac_conv_bound = 0.001
)

Ihat2(method, dW, dZ, sqdt, k, l)

RoesslerRI(
  c0,
  c1,
  c2,
  A0,
  A1,
  A2,
  B0,
  B1,
  B2,
  alpha,
  beta1,
  beta2,
  beta3,
  beta4,
  order = 2,
  quantile = .weak_quantile
)

RoesslerRS(
  c0,
  c1,
  c2,
  A0,
  A1,
  A2,
  B0,
  B1,
  B2,
  B3,
  alpha,
  beta1,
  beta2,
  order = 2,
  quantile = .weak_quantile
)

KomoriNON(
  c0,
  cj,
  cjl,
  clj,
  alpha00,
  alpha0j,
  alphaj0,
  alphajj,
  alphajl,
  alphajljj,
  alphaljjl,
  order = 2,
  quantile = .weak_quantile
)

KomoriNON2(
  c0,
  cj,
  ckj,
  alpha00,
  alpha0j,
  alphaj0,
  alphajj,
  alphajl,
  alphakjjl,
  order = 2,
  quantile = .weak_quantile
)

constructDRI1()

constructRI1()

constructRI3()

constructRI5()

constructRI6()

constructRDI1WM()

constructRDI2WM()

constructRDI3WM()

constructRDI4WM()

constructRS1()

constructRS2()

constructNON()

constructNON2()

checkRIOrder(tableau, tol = 1e-06, ps = 2)

checkRSOrder(tableau, tol = 1e-06, ps = 2)

checkNONOrder(tableau, tol = 1e-06)

Arguments

autodiff, concrete_jac, linsolve, nlsolve, extrapolant, new_jac_conv_bound

Options of the Julia signature of IRI1() (the Jacobian is computed by finite differences or the problem's jac).

theta

Implicitness of the drift stages of IRI1().

method

A weak algorithm (or its name) whose approximation Ihat2() evaluates.

dW, dZ

The discrete random variables of the step.

sqdt

The square root of the step size.

k, l

Indices of the noise channels.

c0, c1, c2, A0, A1, A2, B0, B1, B2, B3, alpha, beta1, beta2, beta3, beta4, order, quantile

Coefficients of a Roessler weak tableau.

cj, cjl, clj, ckj, alpha00, alpha0j, alphaj0, alphajj, alphajl, alphajljj, alphaljjl, alphakjjl

Coefficients of a Komori tableau.

tableau

A weak tableau.

tol

Tolerance of the order conditions.

ps

The weak order whose conditions are checked (1 or 2).

Value

An algorithm, a tableau or a logical vector.

Details

  • DRI1(), RI1(), RI3(), RI5(), RI6(): Debrabant and Roessler's weak order 2 methods for Ito SDEs (adaptive for scalar, diagonal or one dimensional noise); RDI1WM() (order 1), RDI2WM(), RDI3WM(), RDI4WM() (order 2) their methods with fewer stages.

  • RS1(), RS2(): Roessler's weak order 2 methods for Stratonovich SDEs.

  • PL1WM(), PL1WMA(): Platen's weak order 2 method (for general and for additive noise).

  • NON(), NON2(), COM(): Komori's methods for Stratonovich SDEs with non commutative and commutative noise.

  • SIEA(), SIEB(), SMEA(), SMEB(): Tocino and Vigo-Aguiar's weak order 2 methods.

  • W2Ito1(): Tang and Xiao's efficient weak order 2 method.

  • DRI1NM(): DRI1 for non mixing diagonal and scalar noise.

  • IRI1(): RI1 with drift implicit (theta method) stages, for stiff drift.

With several noise channels the stage values use the k-th column of the diffusion for the k-th Wiener process (the diagonal matrix of g for diagonal noise). StochasticDiffEq differs here in three places: RS1() and RS2() with general noise read the first column of the last two diffusion stages, and RS1(), RS2() and PL1WM() with diagonal noise add the k-th diffusion value to every component. For scalar noise and for one Wiener process the results agree with StochasticDiffEq to rounding.

constructDRI1() and the other construct*() functions return the tableaus (RoesslerRI, RoesslerRS, KomoriNON and KomoriNON2 objects); checkRIOrder(), checkRSOrder() and checkNONOrder() test the order conditions. Ihat2() is the approximation of the iterated integral the methods use.

Examples

prob <- SDEProblem(function(u, p, t) 1.01 * u, function(u, p, t) 0.87 * u, 0.5, c(0, 1))
sol <- solve(prob, DRI1(), dt = 0.01, adaptive = FALSE, seed = 1)
sol$retcode
#> [1] "Success"