Package: bsts 0.9.10

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.

Authors:Steven L. Scott <[email protected]>

bsts_0.9.10.tar.gz
bsts_0.9.10.zip(r-4.5)bsts_0.9.10.zip(r-4.4)bsts_0.9.10.zip(r-4.3)
bsts_0.9.10.tgz(r-4.4-x86_64)bsts_0.9.10.tgz(r-4.4-arm64)bsts_0.9.10.tgz(r-4.3-x86_64)bsts_0.9.10.tgz(r-4.3-arm64)
bsts_0.9.10.tar.gz(r-4.5-noble)bsts_0.9.10.tar.gz(r-4.4-noble)
bsts.pdf |bsts.html
bsts/json (API)

# Install 'bsts' in R:
install.packages('bsts', repos = c('https://steve-the-bayesian.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • gdp - Gross Domestic Product for 57 Countries
  • goog - Google stock price
  • initial.claims - Initial Claims Data
  • new.home.sales - New home sales and Google trends
  • rsxfs - Retail sales, excluding food services
  • shark - Shark Attacks in Florida.
  • turkish - Turkish Electricity Usage

On CRAN:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

99 exports 31 stars 3.08 score 6 dependencies 3 dependents 5 mentions 339 scripts 7.2k downloads

Last updated 8 months agofrom:f4573bfa3c. Checks:OK: 7 NOTE: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 03 2024
R-4.5-win-x86_64NOTESep 03 2024
R-4.5-linux-x86_64NOTESep 03 2024
R-4.4-win-x86_64OKSep 03 2024
R-4.4-mac-x86_64OKSep 03 2024
R-4.4-mac-aarch64OKSep 03 2024
R-4.3-win-x86_64OKSep 03 2024
R-4.3-mac-x86_64OKSep 03 2024
R-4.3-mac-aarch64OKSep 03 2024

Exports:AcfDistAddArAddAutoArAddDynamicRegressionAddGeneralizedLocalLinearTrendAddHierarchicalRegressionHolidayAddLocalLevelAddLocalLinearTrendAddMonthlyAnnualCycleAddRandomWalkHolidayAddRegressionHolidayAddSeasonalAddSemilocalLinearTrendAddSharedLocalLevelAddStaticInterceptAddStudentLocalLinearTrendAddTrigAggregateTimeSeriesAggregateWeeksToMonthsbstsbsts.mixedbsts.prediction.errorsBstsOptionsCompareBstsModelsDateRangeDateRangeHolidayDateToPOSIXDayPlotdirmDirmModelOptionsDynamicRegressionArOptionsDynamicRegressionHierarchicalRandomWalkOptionsDynamicRegressionRandomWalkOptionsEstimateTimeScaleExtendTimeFixedDateHolidayGeometricSequenceGetFractionOfDaysInInitialMonthGetFractionOfDaysInInitialQuarterHarveyCumulatorHasDuplicateTimestampsIsRegularLastDayInMonthLastWeekdayInMonthHolidayLongToWideMATCH.NumericTimestampsMatchWeekToMonthMaxWindowWidthMaxWindowWidth.DateRangeHolidayMaxWindowWidth.defaultmbstsMonthDistanceMonthPlotnamed.holidaysNamedHolidayNoDuplicatesNoGapsNthWeekdayInMonthHolidayplot.bstsplot.bsts.mixedplot.bsts.predictionplot.mbstsplot.mbsts.predictionPlotBstsCoefficientsPlotBstsComponentsPlotBstsForecastDistributionPlotBstsMixedComponentsPlotBstsMixedStatePlotBstsPredictionErrorsPlotBstsPredictorsPlotBstsResidualsPlotBstsSizePlotBstsStatePlotDynamicRegressionPlotHolidayPlotMbstsSeriesMeansPlotSeasonalEffectpredict.bstspredict.mbstsqqdistQuarterRegularizeTimestampsRegularizeTimestamps.DateRegularizeTimestamps.defaultRegularizeTimestamps.numericRegularizeTimestamps.POSIXtresiduals.bstsShortenSimulateFakeMixedFrequencyDataSpikeSlabArPriorStateSizesSuggestBurnsummary.bstsweekday.namesWeekEndsMonthWeekEndsQuarterWideToLongYearMonToPOSIXYearPlot

Dependencies:BoomBoomSpikeSlablatticeMASSxtszoo

Readme and manuals

Help Manual

Help pageTopics
bstsbsts-package
AR(p) state componentAddAr
Dynamic Regression State ComponentAddDynamicRegression DynamicRegressionArOptions DynamicRegressionHierarchicalRandomWalkOptions DynamicRegressionOptions DynamicRegressionRandomWalkOptions
Local level trend state componentAddLocalLevel
Local linear trend state componentAddLocalLinearTrend
Monthly Annual Cycle State ComponentAddMonthlyAnnualCycle MonthlyAnnualCycle
Random Walk Holiday State ModelAddRandomWalkHoliday RandomWalkHolidayStateModel
Seasonal State ComponentAddSeasonal
Semilocal Linear TrendAddGeneralizedLocalLinearTrend AddSemilocalLinearTrend
Local level trend state componentAddSharedLocalLevel
Static Intercept State ComponentAddStaticIntercept
Robust local linear trendAddStudentLocalLinearTrend
Trigonometric Seasonal State ComponentAddTrig
Aggregate a fine time series to a coarse summaryAggregateTimeSeries
Aggregate a weekly time series to monthlyAggregateWeeksToMonths
Sparse AR(p)AddAutoAr
Bayesian Structural Time Seriesbsts
Bsts Model OptionsBstsOptions
Compare bsts modelsCompareBstsModels
Date RangeDateRange
Descriptive PlotsDayPlot MonthPlot YearPlot
Diagnostic PlotsAcfDist qqdist
Dynamic intercept regression modeldirm
Specify Options for a Dynamic Intercept Regression ModelDirmModelOptions
Intervals between datesEstimateTimeScale
Extends a vector of dates to a given lengthExtendTime
Checking for RegularityHasDuplicateTimestamps IsRegular NoDuplicates NoGaps
Gross Domestic Product for 57 Countriesgdp
Create a Geometric SequenceGeometricSequence
Compute membership fractionsGetFractionOfDaysInInitialMonth GetFractionOfDaysInInitialQuarter
Google stock priceGOOG goog
HarveyCumulatorHarveyCumulator
Specifying HolidaysDateRangeHoliday FixedDateHoliday Holiday holiday LastWeekdayInMonthHoliday NamedHoliday NthWeekdayInMonthHoliday
Initial Claims Dataiclaims initial.claims
Find the last day in a monthLastDayInMonth
Match Numeric TimestampsMATCH.NumericTimestamps
Find the month containing a weekMatchWeekToMonth
Maximum Window Width for a HolidayMaxWindowWidth MaxWindowWidth.DateRangeHoliday MaxWindowWidth.default
Multivariate Bayesian Structural Time Seriesmbsts
Models for mixed frequency time seriesbsts.mixed
Elapsed time in monthsMonthDistance
Holidays Recognized by Namenamed.holidays
New home sales and Google trendsnew.home.sales
Prediction Errorsbsts.prediction.errors
Plotting functions for Bayesian structural time seriesplot.bsts PlotBstsCoefficients PlotBstsComponents PlotBstsForecastDistribution PlotBstsPredictionErrors PlotBstsResiduals PlotBstsSize PlotBstsState PlotDynamicRegression PlotMonthlyAnnualCycle PlotSeasonalEffect
Plotting functions for mixed frequency Bayesian structural time seriesplot.bsts.mixed PlotBstsMixedComponents PlotBstsMixedState
Plot predictions from Bayesian structural time seriesplot.bsts.prediction
Plot the most likely predictorsPlotBstsPredictors
Plot Holiday EffectsPlotHoliday
Plotting Functions for Multivariate Bayesian Structural Time Seriesplot.mbsts PlotMbstsSeriesMeans
Plot Multivariate Bsts Predictionsplot.mbsts.prediction
Prediction for Bayesian Structural Time Seriesbsts.prediction predict.bsts
Prediction for Multivariate Bayesian Structural Time Seriesmbsts.prediction predict.mbsts
Find the quarter in which a date occursQuarter
Regression Based Holiday ModelsAddHierarchicalRegressionHoliday AddRegressionHoliday HierarchicalRegressionHolidayStateModel RegressionHolidayStateModel
Produce a Regular Series of Time StampsRegularizeTimestamps RegularizeTimestamps.Date RegularizeTimestamps.default RegularizeTimestamps.numeric RegularizeTimestamps.POSIXt
Residuals from a bsts Objectresiduals.bsts
Retail sales, excluding food servicesretail.sales RSXFS rsxfs
Shark Attacks in Florida.shark
Shorten long namesShorten
Simulate fake mixed frequency dataSimulateFakeMixedFrequencyData
Spike and Slab Priors for AR ProcessesSpikeSlabArPrior
Compute state dimensionsStateSizes
Add a state component to a Bayesian structural time series modelstate.specification StateSpecification
Suggested burn-in sizeSuggestBurn
Summarize a Bayesian structural time series objectsummary.bsts
Convert to POSIXtDateToPOSIX YearMonToPOSIX
Turkish Electricity Usageturkish
Check to see if a week contains the end of a month or quarterWeekEndsMonth WeekEndsQuarter
Days of the Weekweekday.names
Convert Between Wide and Long FormatLongToWide WideToLong