Learn R Programming

BayesMRA

An R package for Bayesian spatial and spatio-temporal regression using sparse multi-resolution matrices. This package includes functions for setting up the multi-resolution process and a function mcmc_mra() for fitting a spatial model using Markov Chain Monte Carlo. For details about the model and an example using simulated data, see vignette("BayesMRA").

Installation

Package Installation

If this is your first time installing this package, make sure you have the appropriate compiler.

Installation from gitHub using devtools

To install the package from gitHub, make sure you have the appropriate compiler. Next, make sure you have the devtools package installed. You can install the devtools package using

install.packages("devtools")

Once the devtools library is installed, you can install the BayesMRA library using

devtools::install_github("jtipton25/BayesMRA")

Note: It is recommended to regularly check for updates by using devtools::install_github("jtipton25/BayesMRA") frequently as this package is in active development and regularly undergoes large changes

Installation from CRAN

Installation from CRAN is not currently supported (hopefully coming soon).

Make sure you have the appropriate compiler

  • Linux: It is assumed on Linux systems, the appropriate compiler is available

  • Windows: For Windows, download and install RTools. For R (>=4.0.0) follow the instructions here – older versions of R follow the instructions here.

  • MacOS: If you are on a Mac, make sure you have an openMP supported compiler – see here for instructions on how to get this setup. Follow the instructions for your specific version of R

Copy Link

Version

Install

install.packages('BayesMRA')

Monthly Downloads

24

Version

1.0.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

John Tipton

Last Published

August 18th, 2020

Functions in BayesMRA (1.0.0)

is_numeric_matrix

Check if a numeric matrix of dimension \(n \times m\)
mra_wendland_2d

Code to construct the mutli-resolution sparse basis function representation for fitting spatial processes
is_numeric_vector

Check if a numeric vector of length n
rmvn_arma

A function for sampling from conditional multivariate normal distributions with mean A^-1b and covariance matrix A^-1.
rmvn_arma_scalar

A function for sampling from conditional multivariate normal distributions with mean A^-1b and covariance matrix A^-1.
wendland_basis

calculate the Wendland basis function
is_positive_numeric

Check if a positive numeric value
make_Q_alpha_tau2

Title
is_positive_integer

Check if value is a positive integer or integer-like
rmvn_arma_chol

A function for sampling from conditional multivariate normal distributions with mean A^-1b and covariance matrix A^-1.
mcmc_mra

Bayesian Multi-resolution Spatial Regression
mra_wendland_2d_pred

Code to construct the mutli-resolution sparse basis function representation for fitting spatial processes
is_integer

Check if value is an integer or integer-like
BayesMRA

BayesMRA
make_Q_alpha_2d

Generate CAR precision matrix
is_sympd_matrix

Check if a symmetric positive definite numeric matrix of dimension \(n \times n\)
is_integer_matrix

Check if an integer matrix of dimension \(n \times m\)
is_numeric

Check if a numeric value