Skip to contents

Convert a hmodel object to HMM constructor function calls


hmodel2list(hmodel, hmmdist = TRUE)



A list of class hmodel, as returned in the hmodel component of the fitted model object from msm.


TRUE or FALSE (see "Value" section).


If hmmdist=TRUE, returns a list of objects of class hmmdist. These are the kind of objects returned by HMM constructor functions such as hmmNorm, hmmPois etc. Therefore the list can be passed as the hmodel argument to msm.

If hmmdist=FALSE, returns a list comprised of the corresponding input arguments for the constructor functions, i.e. parameter values of HMM emission distributions. The list has one element per state. Each of these elements has one element per parameter (for univariate HMMs), or one element per outcome distribution, which in turn has one element per parameter (for multivariate HMMs).


Will Hulme and Chris Jackson.