A Feynman Notebook - For Bayesian Time Series Analysis
Here is where I can collect questions about TS analysis that I have as I go through the course. Hopefully I will be better equipped to answer many of these them by the end of the course.
- How does Bayesian TS analysis differ from regular TS analysis?
- Fourier analysis is a powerful tool for time series analysis. How does it relate to Bayesian time series analysis?
- How and what type of prior knowledge into time series analysis?
- Are there models that are unique to Bayesian time series analysis?
- How does distributional thinking affect time series analysis?
- How do we represent uncertainty in Bayesian time series analysis?
- Will we learn about Gaussian Processes in this course?
- What BTS models are most useful in economics and finance?
- Is there a cleanup procedure for time series data?
- Is there an Bayesian EDA for time series?
- we can use differencing to make the time series stationary
- we can use the ACF and PACF
- we can decompose the time series into trend, seasonal, and residual components
- we can visualize autocorrelation using a correlogram
- we can visualize periodicity using a periodogram and spectral density.
- see (Nielsen 2019)
- How do we handle missing data in time series?
- How do we handle non-stationary time series?
- By applying differencing we can make the time series stationary.
- Are there processes for long term memory in time series?
- see (Prado, Ferreira, and West 2023, 124)
- the book also toches on EKF and MKF
- Are there processes for power laws.
- see https://wiki.santafe.edu/images/5/52/Powerlaws.pdf
- Can BTS handle dynamic systems in time series?
- Can we model time series with multiple scales?
- What TS models are useful for regime switching?
- I recall this came up in Davidson-Pilon (2015)
- This is also covered in module 3 of the course.
- How can we simulate time series data?
- How can we forecast time series data?
- How can we find periodicity in time series data?
- Is the Kalman Filter a state-space or dynamic linear model
- see (Prado, Ferreira, and West 2023, 141)
- the book also toches on EKF and MKF
- Particle filters AKA Sequential Monte Carlo methods in the book.
- Are there bayesian time series models of contagion?
- Are there bayesian time series models of epidemics?
- What are seasonal adjustment?
- How to do seasonal adjustment?
- What are the tools for wrangling and cleaning TS data.
- How to use the frequency domain as a key part of understanding and analyzing data?
- How to assess whether an existing trend should be predicted to continue or whether caution should be used in forecasts?
- Do you really understand AR models or are they just a black box?
- What is a unit root?
- How to use tools that would help you decide whether to use a seasonal model and/or include a unit root in models?
- How to use predictor variables to help forecast some variable such as sales? (i.e. regression on time series data)
Cointegration
- What are Cointegrated time series?
- Cointegration is a technique used to find a long term correlation between time series processes that was introduced in 1987 by Nobel laureates Robert Engle and Clive Granger
- also see (Pfaff 2008)
- What are some test for cointegration:
- Engle-Granger,
- Johansen Test,
- the Phillips-Ouliaris test.
NN and Deep learning
- How to use neural network methods to forecast time series?
- RNNs
- lstms
- convolutions
- GRUs
- transformers
- TS foundations models
- Neural Prophet citation needed
- Deep learning foundation models citation needed pre-train NN model with many time series. Is this a form of Bayesian time series analysis?
- How does this BTS relate to deep learning?
- Diffusion models in DL are autoregressive citation needed
- the recently the mamba architecture has been proposed which is an autoregressive state space model. citation needed
Web scraping
- Any tips on scaraping time series data?
Filtering & Smoothing
- What is smoothing in BTS
- decomposing the series as a sum of two components: a smooth component, plus another component that includes all the features that are unexplained by the smooth component.
- one way is to use a moving average.
- in the bayesian context smoothing is the process of estimating the hidden states of a system given the observed data.
- What is filtering in Bayesian Time Series?
in the bayesian context filtering is the process of estimating the hidden states of a system given the observed data.
we want to sample p(/theta_t,k|\mathcal{D}_t)
- What is the Kalman filter?
- see (Prado, Ferreira, and West 2023, 141)
- the book also toches on EKF and MKF
- What is a particle filter?
- see (Prado, Ferreira, and West 2023, sec. 6.2.2) on the The Auxiliary Particle Filter
- what is the Butterworth filter?
- The Butterworth filter is a signal processing filter that has a flat response in passband (or as close as possible to flat)
Models:
- White noise
- Wiener process (random walk)
- AR(1): Autoregressive process order 1
- Ornstein–Uhlenbeck process a continuous-time version of the AR(1) process
- AR(p): Autoregressive process order p
- MA(q): Moving average process order q
- ARMA(p,q): Autoregressive moving average
- SARMA: Seasonal ARMA
- ARIMA: Autoregressive integrated moving average
- SARIMA: Seasonal ARIMA
- VAR: Vector autoregressive
- SVAR: structural vector autoregressive models (SVAR).
- VECM: Vector error correction models (VECM).
- GARCH: Generalized autoregressive conditional heteroskedasticity
- ARCH: Autoregressive conditional heteroskedasticity
- SMC: Sequential Monte Carlo
- MDM: Multiregression dynamic models
- LTMs: latent threshold models
- FFBS: Forward Filtering Backward Sampling
- DLM: Dynamic Linear Models
- BSTS: Bayesian Structural Time Series
- https://drive.google.com/file/d/14US56VzanuLt03XBkoAGzLy0gDEreZUc/view
- TVAR: Time-varying autoregressive models
- DGLM: Dynamic Generalized Linear Models
What is the relation between Dynamic linear time series models (DLTS) models and Bayesian structural time series models (BSTS) models?
Dynamic Linear Time Series (DLTS) models and Bayesian Structural Time Series (BSTS) models are both frameworks for modeling time series data, and they share a strong connection, particularly in the way they approach model formulation and uncertainty. Here’s a breakdown of their relationship:
- Dynamic Linear Time Series (DLTS) Models:
- DLTS models, often referred to as Dynamic Linear Models (DLMs), are a class of models where the parameters (such as the intercept or slope) evolve over time according to a stochastic process. They can be written in a state-space form, consisting of:
- Observation Equation: Relates the observed data to the hidden state.
- State Equation: Describes how the hidden state evolves over time.
- These models use Kalman filtering for inference and prediction.
- DLTS models are flexible in handling non-stationarity and time-varying parameters.
In the course we primarily learned to use Bayesian methods to estimate the parameters of the model.
- Bayesian Structural Time Series (BSTS) Models:
- BSTS models are a Bayesian approach to time series modeling, which generalizes the DLTS framework.
- Like DLTS, they use a state-space form, where the time series is decomposed into different components (e.g., trend, seasonality, regression effects).
- BSTS explicitly incorporates Bayesian inference, where prior distributions are placed on the model components and parameters, and inference is conducted using MCMC or other Bayesian methods.
- One of the key advantages of BSTS is its ability to incorporate model uncertainty, allowing the user to specify structural components (such as trend or seasonality) with uncertainty about their presence or importance in the data.
- Relation Between DLTS and BSTS:
Bayesian Extension of DLTS: BSTS can be seen as a Bayesian extension of DLTS models. While DLTS uses Kalman filtering for deterministic inference, BSTS uses Bayesian methods to quantify and propagate uncertainty in model components and parameters.
Component Decomposition: Both models can represent the time series in terms of structural components (like trends, seasonal patterns, or covariates), but BSTS allows for more flexible modeling of these components using Bayesian priors and hierarchical structures.
Handling of Uncertainty: DLTS models provide point estimates for parameters using Kalman filters, while BSTS incorporates full probabilistic estimates, enabling better uncertainty quantification in the presence of small data, model misspecification, or structural breaks.
Model Complexity: BSTS models can handle more complex scenarios where the structure of the time series isn’t fully known (e.g., unknown seasonality or trends), whereas DLTS is typically used when the structure of the model (e.g., presence of trend or seasonality) is more defined.
for more information on BSTS
Software
- What are the most useful packages in R for time series analysis?
- BOA Bayesian Output Analysis (BOA, Smith 2007) citation needed and
- CODA Convergence Diagnosis and Output Analysis for MCMC (CODA, Plummer, Best, Cowles, and Vines 2006). citation needed
- URCA Unit Root and Cointegration Tests for Time Series Data (URCA, Pfaff 2008)citation needed.
- Vars VAR Modelling (Vars, Pfaff 2008). citation needed
- BSTS Bayesian Structural Time Series (BSTS, Scott and Varian 2014). citation needed
- CausalImpact Causal Impact Analysis (CausalImpact, Brodersen, Gallusser, Koehler, Remy, and Scott 2015). citation needed builds on BSTS and methods from this Inferring causal impact using Bayesian structural time-series models
- KFAS Kalman Filter and Smoother for Exponential Family State Space Models (KFAS, Helske 2017). citation needed
- MARSS Multivariate Autoregressive State-Space Models (MARSS, Holmes, Ward, and Scheuerell 2012). citation needed
- MCMCpack Markov Chain Monte Carlo (MCMCpack, Martin, Quinn, and Park 2011). citation needed
- MCMCglmm Markov Chain Monte Carlo Generalized Linear Mixed Models (MCMCglmm, Hadfield 2010). citation needed
- R-INLA Integrated Nested Laplace Approximations (R-INLA, Rue, Martino, and Chopin 2009). citation needed used approximate Bayesian inference for Latent Gaussian Models that can be expressed as latent Gaussian Markov random fields (GMRF)
- What about in python?
References
Reuse
Citation
@online{bochman2024,
author = {Bochman, Oren},
title = {Week 0: {Feyman} {Notebook} on {Bayesian} {Time} {Series}
{Analysis}},
date = {2024-10-22},
url = {https://orenbochman.github.io/notes/bayesian-ts/module6.html},
langid = {en}
}