Transform a Multichannel Hidden Markov Model into a Single Channel Representation
Transforms data and parameters of a multichannel model into a single channel model. Observed states (symbols) are combined and parameters multiplied across channels.
mc_to_sc(model, combine_missing = TRUE, all_combinations = FALSE)
model |
An object of class |
combine_missing |
Controls whether combined states of observations
at time t are coded missing (coded with * in |
all_combinations |
Controls whether all possible combinations of
observed states are included in the single channel representation or only
combinations that are found in the data. Defaults to |
Note that in case of no missing observations, the log-likelihood of
the original and transformed models are identical but the AIC and BIC
can be different as the model attribute df
is recomputed based
on the single channel representation.
build_hmm
and fit_model
for building and
fitting Hidden Markov models; and hmm_biofam
for information on
the model used in the example.
# Loading a hidden Markov model of the biofam data (hmm object) data("hmm_biofam") # Convert the multichannel model to a single-channel model sc <- mc_to_sc(hmm_biofam) # Likelihoods of the single-channel and the multichannel model are the same # (Might not be true if there are missing observations) logLik(sc) logLik(hmm_biofam)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.