Learn R Programming

bsreg: Bayesian Spatial Regression Models

Estimation of Bayesian spatial models.

Installation

bsreg is available on CRAN. The development version can be installed from GitHub.

install.packages("bsreg")
devtools::install_github("nk027/bsreg")

Demonstration

# Load the package
library("bsreg")

# Estimate a Bayesian linear model using cigarette demand data
x <- blm(log(sales) ~ log(price), data = cigarettes, lags = 1)

# Check convergence via trace and density plots
plot(x)

References

Nikolas Kuschnig (2021). Bayesian spatial econometrics and the need for software. Working Paper, DOI: 10.13140/RG.2.2.11269.68328.

Copy Link

Version

Install

install.packages('bsreg')

Monthly Downloads

265

Version

0.0.2

License

GPL-3 | file LICENSE

Maintainer

Nikolas Kuschnig

Last Published

February 25th, 2022

Functions in bsreg (0.0.2)

bsreg-package

Bayesian Spatial Regression Models
bm

Fit a Bayesian model
set_SAR

Set up a spatial prior
set_SV

Set up a volatility prior
us_states

United States Historical States
tune

Burn-in and tune a Bayesian model sampler
coda

Methods for coda Markov chain Monte Carlo objects
set_NG

Set up a Normal-Gamma prior
set_options

Set up Bayesian model priors and settings
sample

Obtain draws from a Bayesian model sampler
cigarettes

Cigarette demand
set_mh

Settings to tune a Metropolis-Hastings step