matrix of conditional state probabilities of dimension c(nObs, nStates)
Arguments
delta
initial distribution; either
a vector of length nStates, or
a matrix of dimension c(nTracks, nStates) if trackID is provided
Gamma
transition probability matrix; either
a matrix of dimension c(nStates, nStates),
an array of dimension c(nStates, nStates, nTracks) if trackID is provided, or
an array of dimension c(nStates, nStates, nObs) for time-varying transition probabilities, in which case stateprobs_g is called internally
allprobs
matrix of state-dependent probabilities or density values of dimension c(nObs, nStates)
trackID
optional vector of length nObs containing nTracks unique IDs that separate tracks
mod
optional model object containing delta, Gamma, allprobs, and
optionally trackID. When using RTMB::MakeADFun or qreml with
forward in the likelihood, these are reported automatically after model fitting
and the object returned by RTMB::report() or qreml can be passed directly.
forecast
logical, indicating if forecast probabilities \(\Pr(\text{State}_t = j \mid X_1, ..., X_{t-1})\) should be calculated instead.
See Also
Other decoding functions:
stateprobs_g(),
stateprobs_p(),
viterbi(),
viterbi_g(),
viterbi_p()