materncov1 {nimblewomble}R Documentation

Matern Covariance kernel with \nu = 3/2

Description

Computes the Matern covariance matrix with fractal parameter \nu = 3/2. Has the option to compute \Sigma_{d\times d} + \tau^2 I_d.

Usage

materncov1(dists, phi, sigma2, tau2)

Arguments

dists

distance matrix

phi

spatial range

sigma2

spatial variance

tau2

nugget variance

Value

A matrix of covariance terms. For internal use only.

Author(s)

Aritra Halder <aritra.halder@drexel.edu>,
Sudipto Banerjee <sudipto@ucla.edu>

Examples


#####################
# Internal use only #
#####################
# Used across multiple functions
# Example usage
require(nimble)
require(nimblewomble)

set.seed(1)
# Generated Simulated Data
N = 1e2
tau = 1
coords = matrix(runif(2 * N, -10, 10), ncol = 2)
colnames(coords) = c("x", "y")
dists = as.matrix(dist(coords))

cMaterncov1  = compileNimble(materncov1)
cMaterncov1(dists = dists[1:N, 1:N], phi = 1, sigma2 = 1, tau2 = 0)


[Package nimblewomble version 0.1.0 Index]