dmnorm_nngp {BayesNSGP}R Documentation

Function for the evaluating the NNGP approximate density.

Description

dmnorm_nngp (and rmnorm_nngp) calculate the approximate NNGP likelihood for a fixed set of parameters (i.e., A and D matrices). Finally, the distributions must be registered within nimble.

Usage

dmnorm_nngp(x, mean, AD, nID, N, k, log)

Arguments

x

N-vector of data.

mean

N-vector with current values of the mean

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

nID

N x k matrix of neighbor indices.

N

Scalar; number of data measurements.

k

Scalar; number of nearest neighbors.

log

Scalar; should the density be on the log scale (1) or not (0).

Value

The NNGP approximate density.


[Package BayesNSGP version 0.1.2 Index]