seqHMM2.1.0 package

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

bootstrap

Bootstrap Sampling of NHMM Coefficients

build_hmm

Build a Hidden Markov Model

build_lcm

Build a Latent Class Model

build_mhmm

Build a Mixture Hidden Markov Model

build_mm

Build a Markov Model

build_mmm

Build a Mixture Markov Model

cluster_names-set

Set Cluster Names for Mixture Models

cluster_names

Get Cluster Names from Mixture HMMs

cluster_probs

Extract the Prior Cluster Probabilities of MHMM or MNHMM

coef

Get the Estimated Regression Coefficients of Non-Homogeneous Hidden Ma...

data_to_stslist

Transform TraMineR's state sequence object to data.table and vice vers...

emission_probs

Extract the Emission Probabilities of Hidden Markov Model

estimate_mnhmm

Estimate a Mixture Non-homogeneous Hidden Markov Model

estimate_nhmm

Estimate a Non-homogeneous Hidden Markov Model

fit_model

Estimate Parameters of (Mixture) Hidden Markov Models and Their Restri...

forward_backward

Forward and Backward Probabilities for Hidden Markov Model

get_marginals

Compute the Marginal Probabilities from NHMMs

gridplot

Plot Multidimensional Sequence Plots in a Grid

hidden_paths

Most Probable Paths of Hidden States

initial_probs

Extract the Initial State Probabilities of Hidden Markov Model

logLik_hmm

Log-likelihood of a Hidden Markov Model

logLik_nhmm

Log-likelihood of a Non-homogeneous Hidden Markov Model

mc_to_sc_data

Merge Multiple Sequence Objects into One (from Multichannel to Single ...

mc_to_sc

Transform a Multichannel Hidden Markov Model into a Single Channel Rep...

most_probable_cluster

Extract Most Probable Cluster for Each Sequence

mssplot

Interactive Stacked Plots of Multichannel Sequences and/or Most Probab...

nobs

Number of Observations in Hidden Markov Model

permute_states

Permute the states of NHMM using Hungarian algorithm

plot_colors

Plot Colorpalettes

plot.hmm

Plot hidden Markov models

plot.mhmm

Interactive Plotting for Mixed Hidden Markov Model (mhmm)

plot.ssp

Stack Multichannel Sequence Plots and/or Most Probable Paths Plots fro...

posterior_cluster_probabilities

Extract Posterior Cluster Probabilities

posterior_probs

Posterior Probabilities for Hidden Markov Models

predict

Predictions from Non-homogeneous Hidden Markov Models

print

Print Method for a Hidden Markov Model

reexports

Objects exported from other packages

return_msg

Convert return code from estimate_nhmm and estimate_mnhmm to text

separate_mhmm

Reorganize a mixture hidden Markov model to a list of separate hidden ...

seqHMM-deprecated

Deprecated function(s) in the seqHMM package

seqHMM-package

The seqHMM package

simulate_hmm

Simulate hidden Markov models

simulate_mhmm

Simulate Mixture Hidden Markov Models

simulate_mnhmm

Simulate Mixture Non-homogeneous Hidden Markov Models

simulate_nhmm

Simulate Non-homogeneous Hidden Markov Models

simulate_pars

Simulate Parameters of Hidden Markov Models

sort_sequences

Sort sequences in a sequence object

ssp

Define Arguments for Plotting Multichannel Sequences and/or Most Proba...

ssplot

Stacked Plots of Multichannel Sequences and/or Most Probable Paths fro...

stacked_sequence_plot

Stacked Sequence Plots of Multichannel Sequences and/or Most Probable ...

state_names

Get State Names of Hidden Markov Model

summary.mhmm

Summary method for mixture hidden Markov models

summary.mnhmm

Summary method for mixture non-homogenous hidden Markov models

transition_probs

Extract the State Transition Probabilities of Hidden Markov Model

trim_model

Trim Small Probabilities of Hidden Markov Model

update_nhmm

Update Covariate Values of NHMM

vcov.mhmm

Variance-Covariance Matrix for Coefficients of Covariates of Mixture H...

Designed for estimating variants of hidden (latent) Markov models (HMMs), mixture HMMs, and non-homogeneous HMMs (NHMMs) for social sequence data and other categorical time series. Special cases include feedback-augmented NHMMs, Markov models without latent layer, mixture Markov models, and latent class models. The package supports models for one or multiple subjects with one or multiple parallel sequences (channels). External covariates can be added to explain cluster membership in mixture models as well as initial, transition and emission probabilities in NHMMs. The package provides functions for evaluating and comparing models, as well as functions for visualizing of multichannel sequence data and HMMs. For NHMMs, methods for computing average causal effects and marginal state and emission probabilities are available. Models are estimated using maximum likelihood via the EM algorithm or direct numerical maximization with analytical gradients. Documentation is available via several vignettes, and Helske and Helske (2019, <doi:10.18637/jss.v088.i03>). For methodology behind the NHMMs, see Helske (2025, <doi:10.48550/arXiv.2503.16014>).

  • Maintainer: Jouni Helske
  • License: GPL (>= 2)
  • Last published: 2025-09-25