model <- new("MixARGaussian",
prob = exampleModels$WL_At@prob, # c(0.5, 0.5)
scale = exampleModels$WL_At@scale, # c(1, 2)
arcoef = exampleModels$WL_At@arcoef@a ) # list(-0.5, 1.1)
y <- mixAR_sim(model, n = 300, init = rep(0, which.max(model@order)))
## just examples, use larger numbers in practice
nsim <- 30 # 200
burnin <- 10 # 100
x <- bayes_mixAR(y, model, fix_shift = FALSE, tau = c(.15, .25),
nsim = nsim, burnin = burnin)
label_switch(x$mix_weights, m = 5)
Run the code above in your browser using DataLab