bsts: Bayesian Structural Time Series

Time series regression using dynamic linear models fit using MCMC. See Scott and Varian (2014) <DOI:10.1504/IJMMNO.2014.059942>, among many other sources.

Install the latest version of this package by entering the following in R:
AuthorSteven L. Scott <>
Date of publication2017-04-11 11:02:09 UTC
MaintainerSteven L. Scott <>
LicenseLGPL-2.1 | file LICENSE

View on CRAN

Man pages AR(p) state component

add.dynamic.regression: Dynamic Regression State Component Holiday state models

add.local.level: Local level trend state component

add.local.linear.trend: Local linear trend state component

add.seasonal: Seasonal state component

add.semilocal.linear.trend: Semilocal Linear Trend

add.student.local.linear.trend: Robust local linear trend

add.trig: Trigonometric seasonal state component

aggregate.time.series: Aggregate a fine time series to a coarse summary Aggregate a weekly time series to monthly Sparse AR(p)

bsts: Bayesian structural time series

bsts.options: Bsts Model Options

compare.bsts.models: Compare bsts models

estimate.time.scale: Intervals between dates

extend.time: Extends a vector of dates to a given length

format.timestamps: Checking for Regularity

geometric.sequence: Create a Geometric Sequence

get.fraction: Compute membership fractions

goog: Google stock price

HarveyCumulator: HarveyCumulator

iclaims: Initial Claims Data Find the last day in a month

MATCH.NumericTimestamps: Match Numeric Timestamps Find the month containing a week

mixed.frequency: Models for mixed frequency time series

month.distance: Elapsed time in months

new.home.sales: New home sales and Google trends

one.step.prediction.errors: One step prediction errors

plot.bsts: Plotting functions for Bayesian structural time series

plot.bsts.mixed: Plotting functions for mixed frequency Bayesian structural...

plot.bsts.prediction: Plot predictions from Bayesian structural time series

plot.bsts.predictors: Plot the most likely predictors

plot.holidays: Plot bsts holidays

predict.bsts: Prediction for bayesian structural time series

quarter: Find the quarter in which a date occurs

regularize.timestamps: Produce a Regular Series of Time Stamps

residuals.bsts: Residuals from a bsts Object

rsxfs: Retail sales, excluding food services

shorten: Shorten long names Simulate fake mixed frequency data Spike and Slab Priors for AR Processes

state.sizes: Compute state dimensions

StateSpecification: Add a state component to a Bayesian structural time series...

SuggestBurn: Suggested burn-in size

summary.bsts: Summarize a Bayesian structural time series object

timeseries.boxplot: A time series of boxplots

week.ends: Check to see if a week contains the end of a month or quarter


AddAr Man page
AddAutoAr Man page
AddDynamicRegression Man page
AddFixedDateHoliday Man page
AddGeneralizedLocalLinearTrend Man page
AddLastWeekdayInMonthHoliday Man page
AddLocalLevel Man page
AddLocalLinearTrend Man page
AddNamedHolidays Man page
AddNthWeekdayInMonthHoliday Man page
AddSeasonal Man page
AddSemilocalLinearTrend Man page
AddStudentLocalLinearTrend Man page
AddTrig Man page
AggregateTimeSeries Man page
AggregateWeeksToMonths Man page
bsts Man page
bsts.mixed Man page
BstsOptions Man page
bsts.prediction Man page
bsts.prediction.errors Man page
CompareBstsModels Man page
EstimateTimeScale Man page
ExtendTime Man page
GeometricSequence Man page
GetFractionOfDaysInInitialMonth Man page
GetFractionOfDaysInInitialQuarter Man page
goog Man page
GOOG Man page
HarveyCumulator Man page
HasDuplicateTimestamps Man page
iclaims Man page Man page
IsRegular Man page
LastDayInMonth Man page
MATCH.NumericTimestamps Man page
MatchWeekToMonth Man page
MonthDistance Man page
NamedHolidays Man page
new.home.sales Man page
NoDuplicates Man page
NoGaps Man page
plot.bsts Man page
PlotBstsCoefficients Man page
PlotBstsComponents Man page
PlotBstsForecastDistribution Man page
plot.bsts.mixed Man page
PlotBstsMixedComponents Man page
PlotBstsMixedState Man page
plot.bsts.prediction Man page
PlotBstsPredictionErrors Man page
PlotBstsPredictors Man page
PlotBstsResiduals Man page
PlotBstsSize Man page
PlotBstsState Man page
PlotDynamicRegression Man page
PlotHolidays Man page
PlotSeasonalEffect Man page
predict.bsts Man page
Quarter Man page
RegularizeTimestamps Man page
RegularizeTimestamps.Date Man page
RegularizeTimestamps.default Man page
RegularizeTimestamps.numeric Man page
RegularizeTimestamps.POSIXt Man page
residuals.bsts Man page
retail.sales Man page
rsxfs Man page
RSXFS Man page
Shorten Man page
SimulateFakeMixedFrequencyData Man page
SpikeSlabArPrior Man page
StateSizes Man page
state.specification Man page
StateSpecification Man page
SuggestBurn Man page
summary.bsts Man page
TimeSeriesBoxplot Man page
WeekEndsMonth Man page
WeekEndsQuarter Man page


R/ R/utils.R R/add.dynamic.regression.R R/add.local.level.R R/ R/add.local.linear.trend.R R/date.functions.R R/plot_seasonal_effect.R R/mixed.frequency.R R/diagnostics.R R/format.timestamps.R R/ R/bsts.R R/compare.bsts.models.R R/add.student.local.linear.trend.R R/plots.R R/add.semilocal.linear.trend.R R/time_series_boxplot.R R/add.trig.R R/add.generalized.local.linear.trend.R R/plot.holidays.R R/summary.bsts.R R/ R/add.seasonal.R R/predict.bsts.R
man/predict.bsts.Rd man/state.sizes.Rd man/ man/add.student.local.linear.trend.Rd man/get.fraction.Rd man/format.timestamps.Rd man/add.semilocal.linear.trend.Rd man/plot.bsts.predictors.Rd man/summary.bsts.Rd man/regularize.timestamps.Rd man/one.step.prediction.errors.Rd man/new.home.sales.Rd man/mixed.frequency.Rd man/quarter.Rd man/aggregate.time.series.Rd man/bsts.Rd man/ man/add.local.level.Rd man/add.trig.Rd man/add.local.linear.trend.Rd man/ man/shorten.Rd man/timeseries.boxplot.Rd man/goog.Rd man/ man/ man/month.distance.Rd man/residuals.bsts.Rd man/plot.bsts.Rd man/StateSpecification.Rd man/ man/bsts.options.Rd man/MATCH.NumericTimestamps.Rd man/compare.bsts.models.Rd man/add.dynamic.regression.Rd man/extend.time.Rd man/geometric.sequence.Rd man/add.seasonal.Rd man/plot.bsts.prediction.Rd man/SuggestBurn.Rd man/rsxfs.Rd man/iclaims.Rd man/HarveyCumulator.Rd man/ man/plot.bsts.mixed.Rd man/week.ends.Rd man/ man/estimate.time.scale.Rd man/plot.holidays.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.