Variable selection in a class of Bayesian time series models