Demo of Stan model for time series mixtures. This model takes in a number of time series (M), and for a specified number of underlying states (K, K << M), probabilistically estimates the assignment of each time series to a state. General model is a random walk with drift, but other components could be easily added.