Last I checked time varying transition probabilities were not supported: Are time-varying transition probabilities supported by the new hmm_* functions?
AFAIK support for time varying transition matrices has not been added to hmm_marginal
, but I’m not super in the loop.