A R package to fit markov switching vector autoregression