vecchia_Linv {GpGp}R Documentation

Entries of inverse Cholesky approximation

Description

This function returns the entries of the inverse Cholesky factor of the covariance matrix implied by Vecchia's approximation. For return matrix Linv, Linv[i,] contains the non-zero entries of row i of the inverse Cholesky matrix. The columns of the non-zero entries are specified in NNarray[i,].

Usage

vecchia_Linv(covparms, covfun_name, locs, NNarray, start_ind = 1L)

Arguments

covparms

A vector of covariance parameters appropriate for the specified covariance function

covfun_name

See GpGp for information about covariance functions.

locs

matrix of locations. Row i of locs specifies the location of element i of y, and so the length of y should equal the number of rows of locs.

NNarray

A matrix of indices, usually the output from find_ordered_nn. Row i contains the indices of the observations that observation i conditions on. By convention, the first element of row i is i.

start_ind

Compute entries of Linv only for rows start_ind until the last row.

Value

matrix containing entries of inverse Cholesky

Examples

n1 <- 40
n2 <- 40
n <- n1*n2
locs <- as.matrix( expand.grid( (1:n1)/n1, (1:n2)/n2 ) )
covparms <- c(2, 0.2, 0.75, 0)
NNarray <- find_ordered_nn(locs,20)
Linv <- vecchia_Linv(covparms, "matern_isotropic", locs, NNarray)

[Package GpGp version 0.5.0 Index]