R/HMMfilter.R
HMMfilterSDE.Rd
HMMfilterSDE computes the state estimation for a discretely observed stochastic differential equation
HMMfilterSDE(
u,
D,
xi,
bc,
x0dist,
tvec,
yvec,
lfun,
do.smooth = FALSE,
N.sample = 0,
do.Viterbi = FALSE,
pfun = NULL
)
function mapping state (numeric scalar) to advective term (numeric scalar)
function mapping state (numeric scalar) to diffusivity (numeric scalar)
The numerical grid. Numeric vector of increasing values, giving cell boundaries
String indicating boundary conditions. See details.
Prior distribution of the initial state. See details.
Vector of (increasing) time points where observations are taken
Vector of observations at each time point
Likelihood function so that lfun(x,y) gives the likelihood of y given x
Do we want smoothing, or only predictive filtering / estimation?
Number of "typical tracks" sampled (defaults to 0)
Do we want the most probable state sequence, found with the Viterbi algorithm?
C.d.f. of observations given states, i.e. pfun(x,y) gives P(Y<=y | X = x). If supplied, pseudo-prediction residuals will be computed
A list containing: phi A tabulation of the predicitive probability densities psi A tabulation of the estimated probability densities pi (If do.smooth==TRUE) A tabulation of the smoothed probability densities c A vector containing the normalization constants at each time step loglik The total log-likelihood of the model Xmpt A vector containing the most probabile path (if do.Viterbi==TRUE) U A vector containint the pseudo-prediction residuals (if pfun is supplied)
The distribution of the initial condition x0 can be specified in a number of ways: . If x0dist is a function, it is interpreted as the c.d.f. of the initial state . If x0dist is a single number, it is interpreted as a deterministic initial state . If x0dist is a numeric vector of the same length as xi, then it is interpreted as a c.d.f. . If x0dist is a numeric vector with one less element than xi, then it is interpreted as cell probabilities.