Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

posterior_probs

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 hmm or mhmm.

log_space

Compute posterior probabilities in logarithmic scale. The default is FALSE.

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]

seqHMM

Mixture Hidden Markov Models for Social Sequence Data and Other Multivariate, Multichannel Categorical Time Series

v1.0.14
GPL (>= 2)
Authors
Jouni Helske [aut, cre] (<https://orcid.org/0000-0001-7130-793X>), Satu Helske [aut] (<https://orcid.org/0000-0003-0532-0153>)
Initial release
2019-10-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.