Skip to content

seqHMM

2.2.0Package record

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

1packages dependsuggested by 4
8Kdownloads / year
60.5%test coverage
13/13flavors OK

Overview

About

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).

Changes in 2.2.0
  • EM algorithm for NHMMs now supports SQUAREM acceleration

(Varadhan and Roland, 2008).

  • Exposed argument save_all_solutions in estimate_nhmm and

estimate_mnhmm for saving solutions from all restarts.

  • Changed the options of the plots argument options of

stacked_sequence_plot to observations and hidden states.

  • Added an argument ids for get_*_probs functions.
  • estimate_nhmm and estimate_mnhmm now set init_sd=0 if restart=0 and

user has provided initial values.

  • Added default values for id and time for stslist_to_data.
  • Fixed the forward weighting in get_marginals.
  • Improved the performance of posterior_probs.
Show all changes in 2.2.0Hide the rest of the changes in 2.2.0
  • Improved the performance of summary_mnhmm and computation of posterior

cluster probabilities in general.

  • Improved the performance of creating the design matrices in model building.
  • Fixed a bug in coef.mnhmm which resulted an error on extracting

confidence intervals for emission probabilities.

  • Fixed mnhmm example in estimate_mnhmm documentation.
  • Fixed a memory leak in the M-step of initial probabilities of NHMMs.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 26.4 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK13 OK2026-05-02
Show 4 earlier changesHide 4 earlier changes
  • ERROR11 OK, 1 ERROR2026-04-25
  • NOTE12 OK, 2 NOTE2026-04-22
  • ERROR11 OK, 2 NOTE, 1 ERROR2026-04-18
  • NOTE12 OK, 2 NOTE2026-03-10
Advisories

none known

Documentation

In release 2.2.0
READMEYes · 264 wordsVignettesYes · 4 · dynamicNEWSYes · 33% structured · mentions 2.2.0Citation fileYes · cites a publicationWebsitenot declared in DESCRIPTION
Cites a JSS article
Help pages
65 (1 internal)includes a package overview page
Examples that run
100%30 run in a plain check
Exported functions with examples
49%
Documented parameters
99%
Return-value docs
63%
Help pages citing references
12%

Downloads

8K
CRAN downloads in the past year
Rank #4,518 · ~22/day · ~663/mo
Daily download trend is not available in this view yet.
63130 days
1.9K90 days
8K1 year
Compare downloads with other packages →
Also on443 r2u2 autocran

Repository

106Stars
31Forks
11Open issues
0Open PRs
4Releases
1,213Commits
15Commit identities
hidden-markov-modelsmixture-markov-modelsem-algorithmhmmrcategorical-datatime-series
1,213 commits · Last activity 2026-10-23 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
94
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-05-24 · 1002026-08-14 · 106
PracticesBeta

5 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/helske/seqhmm on 2026-10-21.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Coverage (2)
Coverage reporting (Codecov).covrignore
Reproducibility and dev environment (1)
data-raw/
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
24 external dependencies (excludes base and recommended)

Installing seqHMM adds 84 packages (46 with compiled code, 66 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.

Depends (1)
R >= 4.1.0
Suggests (5)
Enhances (0)
none
Reverse dependencies
1direct
0indirect
Imports 1
Suggested by 4
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

Datasets

People & History

People (2)
Author, Maintainer since 1.0.2-1 (2015)
Releases (27)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 2.2.0Latest
    record
    2026-03-16 · current release · diff ↗
  • 2.1.0
    record
    2025-09-25 · diff ↗ ·
    added 1 export
    permute_states
  • 2.0.0
    record
    2025-05-17 · diff ↗ ·
    removed 4 exports
    estimate_coef, fit_hmm, fit_mhmm, trim_hmm
    added 16 exports
    bootstrap_coefs, data_to_stslist, estimate_mnhmm, estimate_nhmm, get_cluster_probs, get_emission_probs, get_initial_probs, get_marginals, get_transition_probs, most_probable_cluster, posterior_cluster_probabilities, simulate_mnhmm, simulate_nhmm, sort_sequences, stacked_sequence_plot, stslist_to_data
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 1.2.6
    record
    2023-07-06 · diff ↗
  • 1.2.5
    record
    2023-06-12 · diff ↗ ·
    added 4 exports
    cluster_names<-, state_names<-, cluster_names, state_names
  • R
    R 4.3.0 released · 2023-04-21
  • 1.2.4
    record
    2023-01-09 · diff ↗
  • 1.2.3
    record
    2022-12-12 · diff ↗
  • 1.2.2
    record
    2022-11-30 · diff ↗
  • 1.2.1-1
    record
    2022-05-25 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 1.2.0
    record
    2021-10-18 · diff ↗
  • 1.1.1
    record
    2021-08-13 · diff ↗
Show 23 earlier eventsHide 23 earlier events

Package metadata

First published
2015-12-19
Total releases
27 / 11 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 4.1.0
Bundled data
408 KB / 8 files
Download size
1.4 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("seqHMM")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for seqHMM version 2.2.0 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy