| computeQF | R Documentation |
Evaluates the quadratic form appearing in the Gaussian log-likelihood under the Nearest-Neighbor Gaussian Process (NNGP).
computeQF(u, v, AD, neighbors.id)
u |
Numeric vector (length |
v |
Numeric vector (length |
AD |
Numeric matrix (
|
neighbors.id |
Integer matrix ( |
This function computes the quadratic form associated with the NNGP precision matrix without explicitly constructing the full covariance or precision matrix.
The expression is obtained by decomposing the joint Gaussian density into a product of conditional densities:
p(\mathbf{x}) = \prod_{i=1}^M p(x_i \mid x_{N(i)})
where N(i) denotes the set of neighbors of location i.
Each term corresponds to a squared, standardized conditional residual:
r_i = u_i - A_i u_{N(i)}
and the quadratic form is:
\sum_i \frac{r_i^2}{D_i}
This provides an efficient way to evaluate the Gaussian log-likelihood under the NNGP approximation.
A scalar value representing the quadratic form:
\sum_{i=1}^M \frac{\left(u_i - A_i u_{N(i)}\right)
\left(v_i - A_i v_{N(i)}\right)}{D_i}
Fabian Ketwaroo
computeAD
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.