Univariate Autoregressive Markov Switching Models for Linear and Generalized Models