dLinSDE | R Documentation |
Transition probabilities in a linear SDE dX = A*X*dt + u*dt + G*dB
dLinSDE(A, G, t, x0 = NULL, u = NULL, S0 = 0 * A)
A |
system matrix, quadratic numeric array or matrix |
G |
noise matrix, same number of rows as A |
t |
time, numeric scalar |
x0 |
Initial state |
u |
forcing. A numeric vector or matrix; see details |
S0 |
Initial variance |
When returning EX, the expectation at time t, the input u can be specified as follows:
* NULL, in which case it is assumed to be absent from the equation
* a numeric vector with an element for each row in A. In this case u is assumed to be constant
* a numeric array or matrix with same number of rows as A and two columns. In this case u is assumed to vary affinely in time, equaling the first column at time 0 and the second column at time t.
The computations are not optimized for large systems, since they rely on the vector form of the matrix equations and do not use sparsity.
A list containing St, the variance of the state at time t, and, depending on input arguments
eAt, the matrix that maps X0 to Xt, i.e. expm(A*t), provided x0==NULL
EX, the expectation of the state at time t, provided x0 is not NULL
# A scalar equation with no input
(dLinSDE(-1,1,1))
# A scalar equation with constant input, starting in steady-state
(dLinSDE(A=-1,G=1,t=3,x0=1,u=1,S0=0.5))
# A 2D system which has no stationary variance
(dLinSDE(A=diag(c(0,-1)),G=diag(2),t=1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.