This page contains a listing of recent changes made to the package.
The functions Viterbi
and residuals
need methods for objects of class mmpp
.
A number of the original functions have names that are too general. For example forwardback
calculates the forward-backward probabilities, but only for the model dthmm
. The corresponding function for the mmpp
model is forwardback.mmpp
. It would be more consistent to attach to these original functions a dthmm
suffix.
The demonstration examples are all for dthmm
. Also need some for mmglm1
, mmglmlong1
and mmpp
.
Since we have included different classes of HMMs (see dthmm
, mmglm0
and mmpp
), it is much tidier to use an object orientated approach. This ensures that the functions across all models follow a more consistent naming convention, and also the argument list for the different model functions are more simple and consistent (see HiddenMarkov
). (14 Sep 2007)
The main tasks (model fitting, residuals, simulation, Viterbi, etc) can now be called by generic functions (see topic HiddenMarkov
). The package documentation has been rearranged so that these generic functions contain the documentation for all model types (e.g. see BaumWelch
). (14 Sep 2007)
There are a number of functions, still contained in the package, that are obsolete. This is either because they do not easily fit into the current naming convention used to implement the more object orientated approach, or their argument list is slightly complicated. These functions have been grouped in the topics dthmm.obsolete
and mmpp.obsolete
. (14 Sep 2007)
There are various second level functions. For example, the model fitting is achieved by the generic BaumWelch
function. However, this will call functions to do the E-step, M-step, forward and backward probabilities, and so on. At the moment, these second level functions have not been modified into an object orientated approach. It is not clear at this point whether this would be advantageous. If one went down this route, then one would probably group all of the E-step functions (for all models) under the same topic. If not, then it may be best to group all second level functions for each model under the same topic (e.g. forwardback
, probhmm
and Estep
would be grouped together, being the second level functions for the dthmm
model). (14 Sep 2007)
The original function called Viterbi
has been renamed to Viterbihmm
, and Viterbi
is now a generic function. (14 Sep 2007)
Programming code that uses old versions of the functions should still work with this revised version of the package. However, you will get warning messages stating that certain functions are deprecated, and suggesting a possible alternative. To get a quick overview of the programming style, have a look at the examples in topic dthmm
. (09 Nov 2007)
forwardback
: for
loops replaced by Fortran code; much faster. The corresponding R code is still contained within the function in case the Fortran has incompatibility issues. (23 Nov 2007)
forwardback.mmpp
: for
loops replaced by Fortran code. The corresponding R code is still contained within the function in case the Fortran has incompatibility issues. (24 Nov 2007)
Estep.mmpp
: for
loops replaced by Fortran code. Cuts time considerably. These loops in R used far more time than the forward and backward equations. The corresponding R code is still contained within the function in case the Fortran has incompatibility issues. (27 Nov 2007)
forwardback.mmpp
, forwardback
and Estep.mmpp
: argument fortran
added. (3 Dec 2007)
forwardback
, forwardback.mmpp
and Estep.mmpp
: inclusion of all variable sized arrays in the Fortran subroutine call to be compatible with non gfortran compilers (3 Dec 2007); more added for calls to Fortran subroutines multi1
and multi2
. (6 Dec 2007)
Estep.mmpp
: error in Fortran code of loop 6; j1=0
to j1=1
. (5 Dec 2007)
BaumWelch.mmpp
: if (diff < 0) stop ...
to if (diff < 0 & control$posdiff) stop ...
, consistent with BaumWelch.dthmm
. (11 Dec 2007)
logLik.dthmm
, logLik.mmglm0
, logLik.mmpp
: for
loop replaced by Fortran code. (15 Feb 2008)
dthmm
: argument discrete
set automatically for known distributions, stops if not set for unknown distributions. (15 Feb 2008)
neglogLik
, Pi2vector
, vector2Pi
, Q2vector
, vector2Q
: new functions providing an alternative means of calculating maximum likelihood parameter estimates. (18 Feb 2008)
dthmm
: argument nonstat
was not set correctly. (21 Jun 2008)
Hyperlinks on package vignettes page. (22 Jun 2008)
mmpp
: argument nonstat
was not set correctly. (23 Jun 2008)
The manual pages HiddenMarkov-dthmm-deprecated
and HiddenMarkov-mmpp-deprecated
have been given a keyword of “internal”. This hides them from the listing of package functions. (3 Jul 2008)
All cited references are now only listed in the topic HiddenMarkov
. (3 Jul 2008)
neglogLik
: argument updatep
has been renamed to pmap
. (9 Jul 2008)
neglogLik
: format of this function changed to be consistent with that in package PtProcess. Argument p
renamed as params
. (07 Aug 2008)
mmglm0
: remove some LaTeX specific formatting to be compatible with R 2.9.0. (26 Jan 2009)
Viterbi
: Correct hyperlink to base function which.max
. (10 Oct 2009)
Tidied HTML representation of equations in manual pages. (15 Dec 2009)
mmglm
: Renamed to mmglm0
, new version mmglm1
. See manual page for more details. (5 Jan 2010)
mmglmlong1
: new function for longitudinal data. (18 Jan 2010)
dthmm
: clarify argument distn
on manual page, and nature of parameter estimates when the Markov chain is stationary. (04 Feb 2010)
BaumWelch.mmglmlong1
: new argument tmpfile
added. (13 Feb 2010)
Viterbi
: Methods added for objects of class "mmglm1"
and "mmglmlong1"
. (29 Jul 2010)
logLik
: Method added for object of class "mmglmlong1"
. (30 Jul 2010)
forwardback.dthmm
, forwardback.mmpp
: New argument "fwd.only"
. (30 Jul 2010)
logLik.dthmm
: Calls forwardback.dthmm
to perform calculations. (30 Jul 2010)
logLik.mmpp
: Calls forwardback.mmpp
to perform calculations. (30 Jul 2010)
Viterbi
: Now generates an error message when applied to objects of class "mmpp"
. Method not currently available. (03 Aug 2010)
"Viterbi.mmglm1"
: Fixed bug with number of Bernoulli trials specification when using a binomial family. (05 Aug 2010)
residuals.dthmm
, probhmm
: Modify for greater efficiency and generality to accommodate more general models. Arguments of probhmm
have also been changed. (05 Aug 2010)
residualshmm
: Made defunct, incompatible with revised probhmm
. (05 Aug 2010)
residuals
: Methods added for objects of class "mmglm1"
and "mmglmlong1"
. Generates an error message when applied to objects of class "mmpp"
, currently no method available. (05 Aug 2010)
Add CITATION file. (24 Sep 2010)
makedistn
: Change eval(parse(text=paste(x, " list(log=log)))", sep="")))
to eval(parse(text=paste(x, " list(log.p=log)))", sep="")))
. (19 Dec 2010)
pglm
, pmmglm
: Change all log
arguments to log.p
. (19 Dec 2010)
Revise examples in /tests
directory. (02 May 2011)
Implement very basic NAMESPACE and remove file /R/zzz.R
. (5 Nov 2011)
List functions explicitly in NAMESPACE. (19 Dec 2011)
mmglm
and neglogLik
: Restrict the number of iterations in examples on manual pages to minimise time during package checks. (19 Dec 2011)
modify.func
: New function to allow the user to modify package functions in the NAMESPACE set-up. This function violates the CRAN policy as users are not supposed to change the NAMESPACE on such packages. Some examples where it is required to modify package functions will not work, for example, the second example in Mstep
. (7 Mar 2012)
modify.func
: Function removed. See the second example in Mstep
for a work-around when package functions need to be modified. (14 Apr 2012)
Mstep
: Revised documentation about distribution requirements and ways to include other distributions into the software framework. (14 Apr 2012)
The package snow has been superseded by parallel, changed where needed. In BaumWelch.mmglmlong1
arguments makeSOCKcluster
and SNOWcluster
renamed to makePSOCKcluster
and PSOCKcluster
, respectively. Functions dmmglm
and pmmglm
added to exported namespace (required for parallel processing). (13 Aug 2014)
BaumWelch.mmglmlong1
: Call to clusterApply
and clusterExport
changed to parallel::clusterApply
and parallel::clusterExport
, respectively. (25 Sep 2014)
Fix error in inst/CITATION
file. (21 Jan 2015)
Added to NAMESPACE: functions imported from stats. (06 Jul 2015)
HiddenMarkov
: Add DOI to some references, rename topic to appear first in table of contents. (16 Oct 2015)
Fortran warning: in file src/extract.f
, integer
definitions should precede double precision
definitions. (29 Aug 2016)
Fix NOTES in R CMD check --as-cran
: Found no calls to: 'R_registerRoutines',
'R_useDynamicSymbols'
(17 Jun 2017)
simulate.mchain
: Change if (sum(object$delta)!=1)
to if (!isTRUE(all.equal(sum(object$delta), 1)))
. (21 Oct 2017)
simulate.mmpp
: Change if (sum(object$delta)!=1)
to if (!isTRUE(all.equal(sum(object$delta), 1)))
. (27 Oct 2017)
Clarify various points in documentation. (27 Oct 2017)
HiddenMarkov
: Hyperlink update to Harte (2019); others updated to https where possible. (27 Apr 2021)