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 |
locs |
matrix of locations. Row |
NNarray |
A matrix of indices, usually the output from |
start_ind |
Compute entries of Linv only for rows |
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)