posterior_probs {seqHMM} | R Documentation |
Posterior Probabilities for (Mixture) Hidden Markov Models
Description
Function posterior_probs
computes the posterior probabilities of hidden states of
a (mixture) hidden Markov model.
Usage
posterior_probs(model, log_space = FALSE)
Arguments
model |
A (mixture) hidden Markov model of class |
log_space |
Compute posterior probabilities in logarithmic scale. The default is |
Value
Posterior probabilities. In case of multiple observations, these are computed independentlsy for each sequence.
Examples
# Load a pre-defined MHMM
data("mhmm_biofam")
# Compute posterior probabilities
pb <- posterior_probs(mhmm_biofam)
# Locally most probable states for the first subject:
pb[, , 1]
[Package seqHMM version 1.2.6 Index]