Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

⚠️There's a newer version (1.7.5) of this package.Take me there.

spate (version 1.7)

Spatio-Temporal Modeling of Large Data Using a Spectral SPDE Approach

Description

Functionality for spatio-temporal modeling of large data sets is provided. A Gaussian process in space and time is defined through a stochastic partial differential equation (SPDE). The SPDE is solved in the spectral space, and after discretizing in time and space, a linear Gaussian state space model is obtained. When doing inference, the main computational difficulty consists in evaluating the likelihood and in sampling from the full conditional of the spectral coefficients, or equivalently, the latent space-time process. In comparison to the traditional approach of using a spatio-temporal covariance function, the spectral SPDE approach is computationally advantageous. See Sigrist, Kuensch, and Stahel (2015) for more information on the methodology. This package aims at providing tools for two different modeling approaches. First, the SPDE based spatio-temporal model can be used as a component in a customized hierarchical Bayesian model (HBM). The functions of the package then provide parameterizations of the process part of the model as well as computationally efficient algorithms needed for doing inference with the HBM. Alternatively, the adaptive MCMC algorithm implemented in the package can be used as an algorithm for doing inference without any additional modeling. The MCMC algorithm supports data that follow a Gaussian or a censored distribution with point mass at zero. Covariates can be included in the model through a regression term.

Copy Link

Version

Install

install.packages('spate')

Monthly Downloads

142

Version

1.7

License

GPL-2

Maintainer

Fabio Sigrist

Last Published

January 7th, 2020

Functions in spate (1.7)

Psigma2

Prior for for variance parameter sigma2 of innovation epsilon. hyperparameter.
ffbs.spectral

Forward Filtering Backward Sampling algorithm in the spectral space of the SPDE.
cols

Function that returns the color scale for 'image()'.
innov.spec

Spectrum of the innovation term epsilon.
get.propagator.vec

Propagator matrix G in vector form.
index.complex.to.real.dft

Auxilary function for the real Fourier transform.
TSmat.to.vect

Converts a matrix stacked vector.
ffbs

Forward Filtering Backward Sampling algorithm.
get.propagator

Propagator matrix G.
get.real.dft.mat

Matrix applying the two-dimensional real Fourier transform.
post.dist.hist

Histogram of posterior distributions.
map.obs.to.grid

Maps non-gridded data to a grid.
matern.spec

Spectrum of the Matern covariance function.
loglike

Log-likelihood of the hyperparameters.
lin.pred

Linear predictor.
mcmc.summary

Summary function for MCMC output.
spate.sim

Simulate from the SPDE.
spateMCMC.RData

'spateMCMC' object output obtained from 'spate.mcmc'.
plot.spateMCMC

Plot fitted spateMCMC objects.
print.spateSim

Print function for 'spateSim' objects.
spate.predict

Obtain samples from predictive distribution in space and time.
propagate.spectral

Function that propagates a state (spectral coefficients).
spate.plot

Plot a spatio-temporal field.
wave.numbers

Wave numbers.
plot.spateSim

Plotting function for 'spateSim' objects.
sample.four.coef

Sample from the full conditional of the Fourier coefficients.
spate-package

Spatio-temporal modeling of large data with the spectral SPDE approach
real.fft

Fast calculation of the two-dimensional real Fourier transform.
vect.to.TSmat

Converts a stacked vector into matrix.
vnorm

Eucledian norm of a vector
spate.init

Constructor for 'spateFT' object which are used for the two-dimensional Fourier transform.
print.spateMCMC

Print function for spateMCMC objects.
real.fft.TS

Fast calculation of the two-dimensional real Fourier transform of a space-time field. For each time point, the spatial field is transformed.
spateMLE.RData

Maximum likelihood estimate for SPDE model with Gaussian observations.
summary.spateSim

Summary function for 'spateSim' objects.
tobit.lambda.log.full.cond

Full conditional for transformation parameter lambda.
trace.plot

Trace plots for MCMC output analysis.
spate.mcmc

MCMC algorithm for fitting the model.
Plambda

Prior for transformation parameter of the Tobit model.
Pmuy

Prior for y-component of drift.
Pgamma

Prior for amount of anisotropy in diffusion parameter gamma.
Prho1

Prior for range parameter rho1 of diffusion.
Ptau2

Prior for nugget effect parameter tau2.
Pmux

Prior for y-component of drift.
Palpha

Prior for direction of anisotropy in diffusion parameter alpha.
Prho0

Prior for range parameter rho0 of innovation epsilon.
Pzeta

Prior for damping parameter zeta.