Learn R Programming

SSNbayes

SSNbayes fits spatio-temporal stream network data using Bayesian inference in Stan.

Installation

You can install the released version of SSNbayes from CRAN with:

install.packages("SSNbayes")

And the development version from GitHub with:

devtools::install_github("EdgarSantos-Fernandez/SSNbayes")

See more details in the articles Santos-Fernandez, Hoef, et al. (2022) and Santos-Fernandez, Ver Hoef, et al. (2022)

Reproducible examples

These examples show the package in action:

  • kaggle.com/edsans/ssnbayes

  • kaggle.com/edsans/ssnbayes-simulated

Example of one of the outputs produced

Evolution of the Boise River exceedance probability:

References

Santos-Fernandez, Edgar, Jay M. Ver Hoef, James M. McGree, Daniel J. Isaak, Kerrie Mengersen, and Erin E. Peterson. 2022. “SSNbayes: An r Package for Bayesian Spatio-Temporal Modelling on Stream Networks.” arXiv. https://doi.org/10.48550/ARXIV.2202.07166.

Santos-Fernandez, Edgar, Jay M. Ver Hoef, Erin E. Peterson, James McGree, Daniel J. Isaak, and Kerrie Mengersen. 2022. “Bayesian Spatio-Temporal Models for Stream Networks.” Computational Statistics & Data Analysis 170: 107446. https://doi.org/https://doi.org/10.1016/j.csda.2022.107446.

Copy Link

Version

Install

install.packages('SSNbayes')

Monthly Downloads

188

Version

0.0.3

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Edgar Santos-Fernandez

Last Published

December 3rd, 2023

Functions in SSNbayes (0.0.3)

pred_ssnbayes

Internal function used to perform spatio-temporal prediction in R using a stanfit object from ssnbayes()
collapse

Collapses a SpatialStreamNetwork object into a data frame
dist_weight_mat_preds

Creates a list of distances and weights between observed and prediction sites
mylm

A simple modeling function using a formula and data
ssnbayes

Fits a mixed linear regression model using Stan
predict.ssnbayes

Performs spatio-temporal prediction in R using an ssnbayes object from a fitted model.
dist_weight_mat

Creates a list containing the stream distances and weights
krig

Internal function used to perform spatio-temporal prediction in R using a stanfit object from ssnbayes()