calculateAD_ns: Calculate A and D matrices for the NNGP approximation

Description Usage Arguments Value

Description

calculateAD_ns calculates A and D matrices (the Cholesky of the precision matrix) needed for the NNGP approximation.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
calculateAD_ns(
  dist1_3d,
  dist2_3d,
  dist12_3d,
  Sigma11,
  Sigma22,
  Sigma12,
  log_sigma_vec,
  log_tau_vec,
  nID,
  N,
  k,
  nu,
  d
)

Arguments

dist1_3d

N x (k+1) x (k+1) array of distances in the x-coordinate direction.

dist2_3d

N x (k+1) x (k+1) array of distances in the y-coordinate direction.

dist12_3d

N x (k+1) x (k+1) array of cross-distances.

Sigma11

N-vector; 1-1 element of the Sigma() process.

Sigma22

N-vector; 2-2 element of the Sigma() process.

Sigma12

N-vector; 1-2 element of the Sigma() process.

log_sigma_vec

N-vector; process standard deviation values.

log_tau_vec

N-vector; nugget standard deviation values.

nID

N x k matrix of neighbor indices.

N

Scalar; number of data measurements.

k

Scalar; number of nearest neighbors.

nu

Scalar; Matern smoothness parameter.

d

Scalar; dimension of the spatial domain.

Value

A N x (k+1) matrix; the first k columns are the 'A' matrix, and the last column is the 'D' vector.


BayesNSGP documentation built on Jan. 9, 2022, 9:07 a.m.