Package: spDBL 1.0.2

Xiang Chen

spDBL: Dynamic Bayesian Learning for Spatiotemporal Mechanistic Models

Provides tools for Bayesian learning of spatiotemporal dynamical mechanistic models. Includes methods for parameter estimation, simulation, and inference using hierarchical and state-space modeling approaches, following Banerjee, Chen, Frankenburg and Zhou (2025) <https://jmlr.org/papers/v26/22-0896.html>.

Authors:Xiang Chen [aut, cre], Sudipto Banerjee [aut]

spDBL_1.0.2.tar.gz
spDBL_1.0.2.tar.gz(r-4.7-arm64)spDBL_1.0.2.tar.gz(r-4.7-x86_64)spDBL_1.0.2.tar.gz(r-4.6-arm64)spDBL_1.0.2.tar.gz(r-4.6-x86_64)
spDBL_1.0.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
spDBL/json (API)

# Install 'spDBL' in R:
install.packages('spDBL', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))
Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

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

cpp

2.70 score 71 exports 97 dependencies

Last updated from:ce91035c80. Checks:6 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK170
linux-devel-x86_64OK184
source / vignettesOK335
linux-release-arm64OK191
linux-release-x86_64OK191
wasm-releaseOK165

Exports:BScal_Bt_btcal_errorbarcal_errorbar_meancal_jacobian_logit_uniformcheck_pdsdMTigemulator_learnemulator_predictexpitFFFF_1step_R_IFF_1step_R_sigma2RFF_bigdata_RFF_IFF_sigma2RFFBSFFBS_IFFBS_predict_exactFFBS_predict_MCFFBS_samplingFFBS_sampling_IFFBS_sampling_sigma2RFFBS_sigma2Rgen_calibrate_datagen_calibrate_data_uncorrgen_exp_kernelgen_expsq_kernelgen_F_ls_AR1gen_F_ls_AR1_EPgen_F_ls_AR2gen_F_ls_AR2_EPgen_ffbs_csvgen_ffbs_datagen_gp_kernelgen_Jtgen_pd_matrixgen_pdegen_prior_u_tau2gen_ran_matrixgenerate_gridgenerate.grid.exactgenerate.grid.lrgenerate.grid.rowsnakeinv_chollppd_id_1tlppd_IG_1tlppd_IW_1tmake_pdsMNIG_samplerMNIW_RMNIW_R_naiiveMNIW_samplerplot_panel_heatmap_9plot_panel_heatmap_9_calplot_panel_heatmap_9_cal_nolabprepare_dataquick_heatquick_saveread_big_csv_quickrecover_from_EP_exactrecover_from_EP_MCrmn_cholrmn_chol_moresample_y_eta_onescale_back_uniformscale_uniformSIRupdate_muSigma_eta_oneupdate_y_etaupdate_y_eta_one

Dependencies:abindbackportsbitbit64bootbroomcarcarDataclicliprcolorspacecorrplotcowplotcpp11crayonDerivdeSolvedoBydplyrfarverforecastFormulafracdiffgenericsggplot2ggpubrggrepelggsciggsignifgluegridExtragtablehmsinvgammaisobandkeeplabelingLaplacesDemonlatticelifecyclelme4lmtestmagrittrMASSMatrixmatrixcalcMatrixModelsmatrixsamplingmgcvmicrobenchmarkminqamniwmodelrnlmenloptrnnetnumDerivpbkrtestpillarpkgconfigpolynomprettyunitsprogresspurrrquantregR6rbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackReacTranreadrreformulasrlangrootSolverstatixS7scalesshapeSparseMstringistringrsurvivaltibbletidyrtidyselecttimeDatetzdburcautf8vctrsviridisLitevroomwithrzoo

PDE Emulation with FFBS

Rendered fromemulation.Rmdusingknitr::rmarkdownon Jun 09 2026.

Last update: 2026-06-09
Started: 2026-06-09

Readme and manuals

Help Manual

Help pageTopics
Backward sampler for the Forward Filter Backward Sampler (FFBS)BS
Update the posterior mean and covariance of the discrepancy fieldcal_Bt_bt
Compute median and 95% credible interval across rowscal_errorbar
Compute mean and 95% credible interval across rowscal_errorbar_mean
Log absolute Jacobian of the logit-uniform transformationcal_jacobian_logit_uniform
Check and repair a matrix to be positive definite and symmetriccheck_pds
Log density of the matrix-T distribution with inverse-gamma right covariancedMTig
Example emulation datasetdt_emulation
Fit an FFBS-based dynamic emulatoremulator_learn
Predict PDE output from a fitted FFBS emulatoremulator_predict
Logistic (expit) functionexpit
Forward Filter for the MNIW dynamic linear modelFF
Single forward filter step (identity right-covariance)FF_1step_R_I
Single forward filter step (scalar right-covariance, sigma-squared times R)FF_1step_R_sigma2R
Forward Filter for big data stored in CSV files (MNIW model)FF_bigdata_R
Forward Filter with identity right-covarianceFF_I
Forward Filter for the scalar-sigma-squared-times-R modelFF_sigma2R
Forward Filter Backward Sampler (MNIW model)FFBS
Forward Filter Backward Sampler (identity right-covariance)FFBS_I
Exact posterior predictive mean using FFBS smoothed states (MNIW model)FFBS_predict_exact
Monte Carlo prediction using FFBS output (MNIW model)FFBS_predict_MC
Draw posterior samples from FFBS output (MNIW model)FFBS_sampling
Draw posterior samples from FFBS output (identity right-covariance)FFBS_sampling_I
Draw posterior samples from FFBS output (scalar sigma-squared-times-R model)FFBS_sampling_sigma2R
Forward Filter Backward Sampler (scalar sigma-squared-times-R model)FFBS_sigma2R
Generate synthetic calibration data with correlated discrepancygen_calibrate_data
Generate synthetic calibration data with uncorrelated discrepancygen_calibrate_data_uncorr
Compute an exponential GP kernel matrixgen_exp_kernel
Compute a squared-exponential (Gaussian) GP kernel matrixgen_expsq_kernel
Build AR(1) covariate list from a list of response matricesgen_F_ls_AR1
Build AR(1) covariate list for the episode-block modelgen_F_ls_AR1_EP
Build AR(2) covariate list from a list of response matricesgen_F_ls_AR2
Build AR(2) covariate list for the episode-block modelgen_F_ls_AR2_EP
Generate synthetic FFBS data and write to CSV filesgen_ffbs_csv
Generate synthetic FFBS data in memorygen_ffbs_data
Compute a Gaussian Process covariance kernel matrixgen_gp_kernel
Compute the cross-covariance matrix between observed and new locationsgen_Jt
Generate a random positive definite matrixgen_pd_matrix
Simulate a spatially extended SIR PDE modelgen_pde
Sample prior discrepancy trajectory and variance sequencegen_prior_u_tau2
Generate a random matrix with entries scaled to [-1, 1]gen_ran_matrix
Generate block indices for big data grid traversalgenerate_grid
Generate an exact block grid analyticallygenerate.grid.exact
Generate a flexible block grid with left-to-right traversalgenerate.grid.lr
Generate a flexible block grid with snake traversalgenerate.grid.rowsnake
Invert a matrix via its Cholesky factorisationinv_chol
One-step log posterior predictive density (identity right-covariance model)lppd_id_1t
One-step log posterior predictive density (scalar sigma-squared-times-R model)lppd_IG_1t
One-step log posterior predictive density (MNIW / inverse-Wishart model)lppd_IW_1t
Force a matrix to be positive definite and symmetricmake_pds
Sample from the Matrix Normal Inverse Gamma (MNIG) distributionMNIG_sampler
MNIW posterior updateMNIW_R
Naive MNIW posterior updateMNIW_R_naiive
Sample from the Matrix Normal Inverse Wishart (MNIW) distributionMNIW_sampler
Plot a 3-by-3 panel of heatmaps across selected time stampsplot_panel_heatmap_9
Plot a 3-by-3 panel of calibration heatmapsplot_panel_heatmap_9_cal
Plot a 3-by-3 panel of calibration heatmaps without axis labelsplot_panel_heatmap_9_cal_nolab
Prepare PDE emulator training and testing data from CSV filesprepare_data
Quick raster heatmapquick_heat
Save a ggplot to a timestamped PNG filequick_save
Read a rectangular block from a large CSV fileread_big_csv_quick
Recover episode-partitioned data to original time dimension (exact)recover_from_EP_exact
Recover episode-partitioned posterior samples to original time dimensionrecover_from_EP_MC
Draw one sample from a matrix-normal distribution (Cholesky parameterisation)rmn_chol
Draw multiple samples from a matrix-normal distribution (Cholesky parameterisation)rmn_chol_more
Draw predictive samples from a precomputed mean and covariancesample_y_eta_one
Invert a uniform scaling transformationscale_back_uniform
Scale a vector to the unit interval via a uniform transformationscale_uniform
Right-hand side of the spatially extended SIR ODESIR
Compute posterior predictive mean and covariance without sampling (single sample)update_muSigma_eta_one
Update the likelihood of observations given PDE parameters (Monte Carlo)update_y_eta
Update the likelihood of observations given PDE parameters (single sample)update_y_eta_one