Learn R Programming

CARrampsOcl (version 0.1.4)

Reparameterized and marginalized posterior sampling for conditional autoregressive models, OpenCL implementation

Description

This package fits Bayesian conditional autoregressive models for spatial and spatiotemporal data on a lattice. It uses OpenCL kernels running on GPUs to perform rejection sampling to obtain independent samples from the joint posterior distribution of model parameters.

Copy Link

Version

Install

install.packages('CARrampsOcl')

Monthly Downloads

22

Version

0.1.4

License

GPL (>= 3)

Maintainer

Last Published

October 25th, 2013

Functions in CARrampsOcl (0.1.4)

setup3

Function to invoke OpenCL package and create kernels
makeRW2Q

Function to construct structure matrix for 1-dimensional random walk 2.
CARrampsOcl-package

Draws independent samples from joint posterior in Bayesian CAR models
iowaSW06

Iowa normalized difference vegetation index (NDVI) data
oclCombo1col1

Function to call OpenCL to calculate posterior means and standard deviations of random effects in models with 1 structure matrix.
plotem

Utility function used by plotting functions.
oclCombo1col

Function to call OpenCL to calculate posterior means and standard deviations of random effects in models with 2 structure matrices.
plot3Q

Plot 3-dimensional data modeled with 3 separate structure matrices
setup2

Function to invoke OpenCL package and create kernels
inprod

Function to compute inner product of two vectors.
oclSampling

Function to call OpenCL for rejection sampling.
multivspost2blog

Evaluate marginalized and reparameterized joint posterior.
multivspost2blogandtausqtot

Function to evaluate marginalized and reparameterized posterior.
makeRW1Q

Function to construct structure matrix for 1-dimenstional random walk 1.
oclKronVectMult1col

Function to call OpenCL program to compute product of a Kronecker product of two matrices times another matrix.
oclCombo1col3

Function to call OpenCL to calculate posterior means and standard deviations of random effects in models with 2 structure matrices.
plot2Q

Function to produce image plot of 2-dimensional data modeled with 2 separate structure matrices.
makeQ

Function to construct a structure matrix for 2-dimensional CAR(1) model.
eigenRW1

Function to compute eigenvalues and eigenvectors of RW1 structure matrix.
oclKronVectMult1col3Q

Function to call OpenCL program to premultiply a matrix by a kronecker product of 3 matrices.
setup1

Function to invoke OpenCL package and create kernels
optimizelogpost

Optimize log of marginalized and reparameterized joint posterior.
plotCAR1plus1Q

Plot 3-dimensional data modeled with a 2-dimensional CAR1 plus a 1-dimensional structure matrix
eigenCAR1

Function to compute eigenvalues and eigenvectors of CAR1 structure matrix. The structure matrix is of dimension nr by nc.
rdirichlet

Generate random samples from dirichlet distribution.
CARrampsOcl.fit

Fit Bayesian normal conditional autoregressive model
plotCAR1

Function to plot 2-dimensional data modeled using a single structure matrix.
iowaSW97_06small

Southwest Iowa 10-year normalized difference vegetation index NDVI values