# NOT RUN {
## Example 1 : local level + seasonal (d = 3)
y <- cbind(seq(0.5,100,by=0.5)*0.1 + rnorm(200),
seq(100.25,150,by=0.25)*0.05 + rnorm(200),
rnorm(200, 5,1))
model.1 <- model(y = y, components = c("trend", "seasonal"), seas.period = 7)
mcmc.1 <- mcmc(model.1, s0.r = diag(3), s0.eps = diag(3), niter = 50, burn = 5)
## Example 2 : local level + seasonal + covariates (d = 2)
y <- cbind(rnorm(100), rnorm(100, 2, 3))
X <- cbind(rnorm(100, 0.5, 1) + 5, rnorm(100, 0.2, 2) - 2)
model.2 <- model(y = y, components = c("trend", "seasonal"), seas.period = 7)
mcmc.2 <- mcmc(model.2, X = X, s0.r = diag(2), s0.eps = diag(2), niter = 100, burn = 10)
# }
Run the code above in your browser using DataLab