Skip to contents

A diagnostic function that tests the reliability of estimation procedures given the inferred transition rates

Usage

conf_mat(N, res, plot = TRUE)

Arguments

N

(numeric) number of simulations

res

(mcmc_hmm_*) simulated MCMC HMM model

plot

(logical) plot confusion matrix. By default TRUE

Details

First the data is simulated given the inferred model parameters and transition rates. Then posterior probabilities are calculated and states are inferred. Finally, the inferred states and simulated states are compared via confusion_matrix function.

Examples

if (interactive()) {
  res <- conf_mat(100, example_hmm_mcmc_normal, plot = TRUE) 
}