Fitting Markov Switching Models