Skip to content

R-package for performing Bayesian Variable Selection in Double Generalized Linear Tweedie Spatial Process Models

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

arh926/sptwdglm

Repository files navigation

sptwdglm: An R-package for performing Bayesian Variable selection using Spike and Slab priors for Double Generalized Linear Tweedie Spatial Process Models

Maintainer

sptwdglm contains MCMC algorithms for fitting the following models:

Function Models
dglm.autograd.R Double Generalzied Linear Model (DGLM)
ssdglm.autograd.R Spike and Slab Priors for DGLMs
spdglm.autograd.R Spatial DGLMs
spssdglm.autograd.R Spike and Slab Priors for Spatial DGLMs

Variable selection is performed using the function FDR.R on the model coefficients.

It supplements the paper titled, "Bayesian Variable Selection in Double Generalized Linear Tweedie Spatial Process Models", New England Journal of Statistics in Data Science: Special Issue on Modern Bayesian Methods with Applications in Data Science (https://doi.org/10.51387/23-NEJSDS37).

All of the above MCMC samplers use a Metropolis Adjusted Langevin Algorithm (MALA, see Girolami and Calderhead, 2011 https://rss.onlinelibrary.wiley.com/doi/10.1111/j.1467-9868.2010.00765.x).

Figure showing spatial patterns on the left column and logarithm of aggregated Tweedie response on the right column for 10,000 realizations across 100 locations.

Installation

You can install the development version of sptwdglm like so:

# if you dont have devtools installed
# install.packages("devtools")
devtools::install_github("arh926/sptwdglm")

Example

There are examples contained within every function. Please install the package to view them.

require(sptwdglm)

# non-spatial
mc <- Function(response, mean covariates, dispersion covariates, mcmc parameters)
# spatial
mc <- Function(coordinates, response, mean covariates, dispersion covariates, mcmc parameters)

# Diagnostics
plot_mcmc(posterior samples)

# Variable selection through FDR for coefficients
FDR(mean coefficients)
FDR(dispersion coefficients)

About

R-package for performing Bayesian Variable Selection in Double Generalized Linear Tweedie Spatial Process Models

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages