<!-- % TODO(stevescott): fix flaky mixed.frequency examples in .Rd files -->
## Not run: ------------------------------------
# ## This example is flaky and needs to be fixed
# data <- SimulateFakeMixedFrequencyData(nweeks = 104, xdim = 20)
# state.specification <- AddLocalLinearTrend(list(), data$coarse.target)
# weeks <- index(data$predictor)
# months <- index(data$coarse.target)
# which.month <- MatchWeekToMonth(weeks, months[1])
# membership.fraction <- GetFractionOfDaysInInitialMonth(weeks)
# contains.end <- WeekEndsMonth(weeks)
#
# model <- bsts.mixed(target.series = data$coarse.target,
# predictors = data$predictors,
# membership.fraction = membership.fraction,
# contains.end = contains.end,
# which.coarse = which.month,
# state.specification = state.specification,
# niter = 500)
#
# plot(model, "state")
# plot(model, "components")
## ---------------------------------------------
Run the code above in your browser using DataLab