Package: bmstdr 0.7.9

bmstdr: Bayesian Modeling of Spatio-Temporal Data with R

Fits, validates and compares a number of Bayesian models for spatial and space time point referenced and areal unit data. Model fitting is done using several packages: 'rstan', 'INLA', 'spBayes', 'spTimer', 'spTDyn', 'CARBayes' and 'CARBayesST'. Model comparison is performed using the DIC and WAIC, and K-fold cross-validation where the user is free to select their own subset of data rows for validation. Sahu (2022) <doi:10.1201/9780429318443> describes the methods in detail.

Authors:Sujit K. Sahu [aut, cre], Duncan P. Lee [aut], K. Shuvo Bakar [aut]

bmstdr_0.7.9.tar.gz
bmstdr_0.7.9.zip(r-4.5)bmstdr_0.7.9.zip(r-4.4)bmstdr_0.7.9.zip(r-4.3)
bmstdr_0.7.9.tgz(r-4.4-x86_64)bmstdr_0.7.9.tgz(r-4.4-arm64)bmstdr_0.7.9.tgz(r-4.3-x86_64)bmstdr_0.7.9.tgz(r-4.3-arm64)
bmstdr_0.7.9.tar.gz(r-4.5-noble)bmstdr_0.7.9.tar.gz(r-4.4-noble)
bmstdr.pdf |bmstdr.html
bmstdr/json (API)

# Install 'bmstdr' in R:
install.packages('bmstdr', repos = c('https://sujit-sahu.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/sujit-sahu/bmstdr/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • Weng - A 313 by 313 proximity matrix for the 313 LADCUAS in England. Each entry is either 0 or 1 and is 1 if the corresponding row and column LADCUAs share a common boundary.
  • argo_floats_atlantic_2003 - Temperature and salinity data from Argo floats in the North Atlantic Ocean at three layers of depth: surface (less than 50 meters), mid-layer (between 475-525 meters) and deep (975 to 1025 meters) during 2003.
  • colpalette - The color palette used to draw maps to illustrate the package bmstdr, see Sahu (2022) It has the values in order: dodgerblue4, dodgerblue2, firebrick2, firebrick4 and purple.
  • engdeaths - Number of weekly Covid-19 deaths and cases in the 313 local Local Authority Districts, Counties and Unitary Authorities (LADCUA) in England during the 20 peaks in the first peak from March 13 to July 31, 2020.
  • engtotals - Total number of weekly Covid-19 deaths and cases in the 313 local Local Authority Districts, Counties and Unitary Authorities (LADCUA) in England during the first peak from March 13 to July 31, 2020.
  • gridnyspatial - Values of three covariates for 100 grid locations in New York averaged over the 62 days during the months of July and August, 2006.
  • gridnysptime - Values of three covariates for 100 grid locations in New York for the 62 days during the months of July and August, 2006.
  • nyspatial - Average ozone concentration values and three covariates from 28 sites in New York.
  • nysptime - Daily 8-hour maximum ozone concentration values and three covariates from 28 sites in New York for the 62 days during the months of July and August, 2006.
  • ydata - Average air pollution values from 28 sites in New York.

On CRAN:

bayesianmodellingspatio-temporal-data

5.43 score 15 stars 18 scripts 272 downloads 21 exports 187 dependencies

Last updated 11 months agofrom:23b4c72e56. Checks:OK: 1 NOTE: 8. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 26 2024
R-4.5-win-x86_64NOTEOct 26 2024
R-4.5-linux-x86_64NOTEOct 26 2024
R-4.4-win-x86_64NOTEOct 26 2024
R-4.4-mac-x86_64NOTEOct 26 2024
R-4.4-mac-aarch64NOTEOct 26 2024
R-4.3-win-x86_64NOTEAug 27 2024
R-4.3-mac-x86_64NOTEAug 27 2024
R-4.3-mac-aarch64NOTEAug 27 2024

Exports:BcartimeBCauchyBmchoiceBmoving_sptimebmstdr_variogramBnormalBspatialBsptimecalculate_validation_statisticsfig11.13.plotfnc.delete.map.XYZget_parameter_estimatesget_validation_summariesgetvalidrowshitandfalsealarmis.bmstdrmaterncovmaternfunobs_v_pred_plotphichoice_spphichoicep

Dependencies:abindbackportsbase64encBHbootbrewbroombslibcachemcallrcarCARBayesCARBayesdataCARBayesSTcarDatacheckmateclassclassIntclicodacodetoolscolorspacecorrplotcowplotcpp11crayoncrosstalkDBIdeldirDerivdescdigestdistributionaldoBydotCall64dplyre1071evaluateevdextraDistrfansifarverfastmapfmesherfontawesomeforcatsforeachFormulafsgenericsgeojsonsfgeometriesGGallyggplot2ggpubrggrepelggsciggsignifggstatsglmnetgluegridExtragtablegtoolshighrhmshtmltoolshtmlwidgetshttpuvigraphinlabruinlineintervalsisobanditeratorsjquerylibjsonifyjsonliteKernSmoothknitrlabelinglaterlatticelazyevalleafemleafletleaflet.providersleafpoplifecyclelme4loomagicmagrittrmapviewMASSMatrixMatrixModelsmatrixStatsmcmcMCMCpackmemoisemgcvmicrobenchmarkmimeminqamnormtmodelrmunsellnlmenloptrnnetnumDerivpatchworkpbkrtestpillarpkgbuildpkgconfigplyrpngpolynomposteriorprettyunitsprocessxprogresspromisesproxypspurrrquantregQuickJSRR6rapidjsonrrappdirsrasterrbibutilsRColorBrewerRcppRcppEigenRcppParallelRdpackrlangrmarkdownrstanrstantoolsrstatixs2sasssatellitescalesservrsfsfheadersshapespspacetimespamSparseMspBayesspDataspdepspTDynspTimerStanHeadersstringistringrsurvivalsvglitesystemfontstensorAterratibbletidyrtidyselecttinytextruncdisttruncnormunitsutf8uuidvctrsviridisLitewithrwkxfunxtsyamlzoo

bmstdr: Bayesian Modeling of Space Time Data with R

Rendered fromvigverysmall.Rmdusingknitr::rmarkdownon Oct 26 2024.

Last update: 2023-12-19
Started: 2023-12-19

Readme and manuals

Help Manual

Help pageTopics
Temperature and salinity data from Argo floats in the North Atlantic Ocean at three layers of depth: surface (less than 50 meters), mid-layer (between 475-525 meters) and deep (975 to 1025 meters) during 2003.argo_floats_atlantic_2003
Bayesian regression model fitting for areal and areal spatio-temporal data. Calculates parameter estimates, validation statistics, and estimated values of several Bayesian model choice criteria.Bcartime
Cauchy prior simulation example.BCauchy
Model choice criteria calculation for univariate normal model for both known and unknown sigma^2Bmchoice
Model fitting and validation for spatio-temporal data from moving sensors in time.Bmoving_sptime
Calculates and plots the variogram cloud and an estimated variogram.bmstdr_variogram
N(theta, sigma2): Using different methods.Bnormal
Bayesian regression model fitting for point referenced spatial data. Calculates parameter estimates, validation statistics, and estimated values of several Bayesian model choice criteria.Bspatial
Bayesian regression model fitting for point referenced spatio-temporal data. Calculates parameter estimates, validation statistics, and estimated values of several Bayesian model choice criteria.Bsptime
Calculate DIC function. Has two arguments: (1) log full likelihood at thetahat and (2) vector of log-likelihood at the theta samples Calculate the DIC criteria valuescalculate_dic
Calculates the four validation statistics: RMSE, MAE, CRPS and coverage given the observed values and MCMC iterates.calculate_validation_statistics
Calculate WAIC function. Has the sole argument component wise likelihood at thetahat samples. v must be a matrix Calculate the WAIC criteria valuescalculate_waic
Prints and returns the estimates of the coefficientscoef.bmstdr
The color palette used to draw maps to illustrate the package bmstdr, see Sahu (2022) It has the values in order: dodgerblue4, dodgerblue2, firebrick2, firebrick4 and purple.colpalette
Number of weekly Covid-19 deaths and cases in the 313 local Local Authority Districts, Counties and Unitary Authorities (LADCUA) in England during the 20 peaks in the first peak from March 13 to July 31, 2020.engdeaths
Total number of weekly Covid-19 deaths and cases in the 313 local Local Authority Districts, Counties and Unitary Authorities (LADCUA) in England during the first peak from March 13 to July 31, 2020.engtotals
Draws a time series (ribbon) plot by combining fitted and predicted valuesfig11.13.plot
Extract fitted values from bmstdr objects.fitted.bmstdr
This function is used to delete values outside the state of New Yorkfnc.delete.map.XYZ
Obtains parameter estimates from MCMC samplesget_parameter_estimates
Obtains suitable validation summary statistics from MCMC samples obtained for validation.get_validation_summaries
Returns a vector of row numbers for validation.getvalidrows
Values of three covariates for 100 grid locations in New York averaged over the 62 days during the months of July and August, 2006.gridnyspatial
Values of three covariates for 100 grid locations in New York for the 62 days during the months of July and August, 2006.gridnysptime
Calculate the hit and false alarm rateshitandfalsealarm
Is it a bmstdr model fitted object?is.bmstdr
Banerjee, Carlin and Gelfand (2015) Mat'ern covariance functionmaterncov
Banerjee et al Mat'ern covariance functionmaternfun
Average ozone concentration values and three covariates from 28 sites in New York.nyspatial
Daily 8-hour maximum ozone concentration values and three covariates from 28 sites in New York for the 62 days during the months of July and August, 2006.nysptime
Observed against predicted plotobs_v_pred_plot
Grid search method for choosing phi Calculates the validation statistics using the spatial model with a given range of values of the decay parameter phi.phichoice_sp
Calculates the validation statistics using the spatial model with a given range of values of the decay parameter phi.phichoicep
Plot method for bmstdr objects.plot.bmstdr
Provides basic information regarding the fitted model.print.bmstdr
Extract residuals from a bmstdr fitted object.residuals.bmstdr
Provides basic summaries of model fitting.summary.bmstdr
Prints the termsterms.bmstdr
A 313 by 313 proximity matrix for the 313 LADCUAS in England. Each entry is either 0 or 1 and is 1 if the corresponding row and column LADCUAs share a common boundary.Weng
Average air pollution values from 28 sites in New York.ydata