#------------------------------------------------------
#
#  Three state MCMC (cfr Andrieu at al.)
#  -> evolution of mu
#
#  GdA 2/4/2016
#------------------------------------------------------

T <- rbind( c(0, 1, 0), c(0, 0.1, 0.9), c(0.6, 0.4, 0) )

mu <- t( c(1,1,1)/3 )
mu <- c(1,0,0)

# mu <- t(p)    # p results from T_to_t.R

print(as.vector(mu))

for (i in 1:20) {
  Sys.sleep(0.3)  
  mu <- mu %*% T
  print( round(as.vector(mu),4) )
}
