calculateU_ns calculates the (sparse) matrix U (i.e., the Cholesky
of the inverse covariance matrix) using a nonstationary covariance function.
The output only contains non-zero values and is stored as three vectors:
(1) the row indices, (2) the column indices, and (3) the non-zero values.
NOTE: this code assumes the all inputs correspond to the ORDERED locations.
calculateU_ns(
dist1_3d,
dist2_3d,
dist12_3d,
Sigma11,
Sigma22,
Sigma12,
log_sigma_vec,
log_tau_vec,
nu,
nID,
cond_on_y,
N,
k,
d,
M = 0
)Returns a sparse matrix representation of the Cholesky of the precision matrix for a fixed set of covariance parameters.
N x (k+1) x (k+1) array of distances in the x-coordinate direction.
N x (k+1) x (k+1) array of distances in the y-coordinate direction.
N x (k+1) x (k+1) array of cross-distances.
N-vector; 1-1 element of the Sigma() process.
N-vector; 2-2 element of the Sigma() process.
N-vector; 1-2 element of the Sigma() process.
N-vector; process standard deviation values.
N-vector; nugget standard deviation values.
Scalar; Matern smoothness parameter.
N x k matrix of (ordered) neighbor indices.
A matrix indicating whether the conditioning set for each
(ordered) location is on the latent process (y, 1) or the observed
values (z, 0). Calculated in sgvSetup.
Scalar; number of data measurements.
Scalar; number of nearest neighbors.
Scalar; dimension of the spatial domain.
Scalar; number of prediction sites.