This project uses Bayesian autoregressive models to forecast the annual count of worldwide earthquakes (magnitude > 7) using data from the USGS. The analysis focuses on a standalone AR(3) model with posterior inference, model order selection, and forecasting. The report also includes theoretical comparison with a mixture of AR(3) models.
- Model: AR(3) with Normal-Inverse Gamma conjugate prior
- Inference: Posterior sampling with 5000 draws in R
- Model order selection using PACF, AIC, and BIC
- Prior sensitivity analysis on hyperparameters
π Note: While the accompanying report includes discussion of a mixture of AR(3) models and their DIC-based comparison, the current codebase implements only the standalone AR(3) analysis and forecasting pipeline.
- AR(3) model selected via PACF and AIC/BIC
- Posterior inference shown to be robust to prior hyperparameters
- Forecasts for 2021β2024: 12, 10, 10, 11 earthquakes
R/: Scripts for model order selection, prior sensitivity analysis, and predictiondata/: Earthquake count data (taken from USGS website)results/: Saved plots and intermediate outputs (PACF, AIC/BIC)report/: PDF capstone report written in Overleaf
- Demonstrates practical application of Bayesian time series modeling in R
- Implements MCMC-based posterior estimation with uncertainty quantification
- Uses real-world geophysical data in a forecasting context
- R (version 4.x)
- Key packages:
mvtnorm,MASS,stats,base
- Add inline comments to R scripts for better readability
- Reproduce missing mixture model code (optional)
- Convert scripts into R Markdown notebooks (optional)
Install required packages with:
install.packages(c("mvtnorm", "MASS"))