Package: HMMscpg 1.0.0

Amina Shahzadi

HMMscpg: Hidden Markov Models and Shifted Compound Poisson-Gamma Renewal Process

Provides functions to define, simulate and fit hidden Markov models, hidden semi-Markov models, and their time-varying versions, to incompletely observed point process records. Such data arise when some events of an underlying point process are not recorded or are otherwise missing. The models treat the number of missing events between each pair of consecutively observed events of a point process record as a hidden process. The number of missing events may be fixed or modelled as a random variable whose distribution can vary over time. When the number of missing events is fixed, the observed event times can be modelled as a compound gamma renewal process. When it is random, the observed process is represented by a shifted compound Poisson-gamma renewal process, which may also depend on time, leading to a time-dependent shifted compound Poisson-gamma renewal process. These modelling frameworks are described in detail in Shahzadi, Wang, Parry and Bebbington (2023) <doi:10.1007/s10463-022-00843-5> and Shahzadi, Wang, Parry and Bebbington (2026) <doi:10.1007/s11634-025-00632-x>. The model parameters are estimated through direct nonlinear numerical optimization of the corresponding likelihood function, and each fit reports whether the change points of its time-dependent components are identified by the data. The package also provides methods for assessing model adequacy through residual analysis. In addition, it calculates and plots the most probable sequences of hidden states, allowing users to examine changes in the underlying missing-event process over time.

Authors:Amina Shahzadi [aut, cre], Ting Wang [aut]

HMMscpg_1.0.0.tar.gz
HMMscpg_1.0.0.zip(r-4.7-x86_64)HMMscpg_1.0.0.zip(r-4.7-arm64)HMMscpg_1.0.0.zip(r-4.6-x86_64)HMMscpg_1.0.0.zip(r-4.6-arm64)
HMMscpg_1.0.0.tar.gz(r-4.7-arm64)HMMscpg_1.0.0.tar.gz(r-4.7-x86_64)HMMscpg_1.0.0.tar.gz(r-4.6-arm64)HMMscpg_1.0.0.tar.gz(r-4.6-x86_64)
HMMscpg_1.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
HMMscpg/json (API)

# Install 'HMMscpg' in R:
install.packages('HMMscpg', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))
Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

cpp

1.00 score 26 exports 7 dependencies

Last updated from:1766f3c524. Checks:10 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK182
linux-devel-x86_64OK218
source / vignettesOK310
linux-release-arm64OK307
linux-release-x86_64OK249
windows-devel-arm64OK317
windows-devel-x86_64OK209
windows-release-arm64OK329
windows-release-x86_64OK206
wasm-releaseOK114

Exports:dscpgfit.hmm.scpgfit.hsmm.scpgfit.ihmm.scpgfit.ihsmm.scpgfit.scpghmm.scpghsmm.scpgihmm.scpgihsmm.scpgpscpgqscpgrscpgsim.hmm.scpgsim.hsmm.scpgsim.ihmm.scpgsim.ihsmm.scpgsp.hmm.scpgsp.hsmm.scpgsp.ihmm.scpgsp.ihsmm.scpgvip.hmm.scpgvip.hsmm.scpgvip.ihmm.scpgvip.ihsmm.scpgWBsum

Dependencies:BesselgmprbibutilsRcppRcppArmadilloRdpackRmpfr

Readme and manuals

Help Manual

Help pageTopics
HMMscpg: Hidden Markov Models with Shifted Compound Poisson-Gamma Renewal ProcessesHMMscpg-package HMMscpg
Density of the SCPG and TSCPG distributionsdscpg
Fitting an m-state HMM with gamma, SCPG or TSCPG renewal processesfit.hmm.scpg
Fitting of an m-state HSMM with gamma or SCPG or TSCPG renewal processesfit.hsmm.scpg
Fitting of an m-state IHMM with gamma or SCPG or TSCPG renewal processesfit.ihmm.scpg
Fitting of an m-state IHSMM with gamma or SCPG or TSCPG renewal processesfit.ihsmm.scpg
Fitting the SCPG and TSCPG distributionsfit.scpg
An m-state HMM with gamma, SCPG or TSCPG renewal processeshmm.scpg
An m-state HSMM with gamma or SCPG or TSCPG renewal processeshsmm.scpg
An m-state IHMM with gamma or SCPG or TSCPG renewal processesihmm.scpg
An m-state IHSMM with gamma or SCPG, or TSCPG renewal processesihsmm.scpg
Distribution function of the SCPG and TSCPG distributionspscpg
Quantile function of the SCPG and TSCPG distributionsqscpg
Random number generation from an SCPG or a TSCPG distributionrscpg
Simulation from an m-state HMM with gamma, SCPG or TSCPG renewal processessim.hmm.scpg
Simulation from an m-state HSMM with gamma or SCPG or TSCPG renewal processessim.hsmm.scpg
Simulation from an m-state IHMM with gamma, SCPG and TSCPG renewal processessim.ihmm.scpg
Simulation from an m-state IHSMM with gamma, SCPG and TSCPG renewal processessim.ihsmm.scpg
Smoothed probabilities and residuals for an m-state HMM with gamma, SCPG or TSCPG renewal processessp.hmm.scpg
Smoothed probabilities for an m-state HSMM with gamma or SCPG or TSCPG renewal processessp.hsmm.scpg
Smoothed probabilities for an m-state IHMM with gamma or SCPG or TSCPG renewal processessp.ihmm.scpg
Smoothed probabilities for an m-state IHSMM with a gamma or an SCPG or a TSCPG renewal processsp.ihsmm.scpg
Viterbi path for an m-state HMM with gamma or SCPG or TSCPG renewal processesvip.hmm.scpg
Viterbi path for an m-state HSMM with gamma or SCPG or TSCPG renewal processesvip.hsmm.scpg
Viterbi path for an m-state IHMM with gamma or SCPG or TSCPG renewal processesvip.ihmm.scpg
Viterbi path for an m-state IHSMM with gamma or SCPG or TSCPG renewal processesvip.ihsmm.scpg
Wright's generalized Bessel function of the SCPG densityWBsum