Last chance! 50% off unlimited learning
Sale ends in
This function returns Vecchia's (1988) approximation to the Gaussian loglikelihood. The approximation modifies the ordered conditional specification of the joint density; rather than each term in the product conditioning on all previous observations, each term conditions on a small subset of previous observations.
vecchia_meanzero_loglik(covparms, covfun_name, y, locs, NNarray)
a list containing
loglik
: the loglikelihood
A vector of covariance parameters appropriate for the specified covariance function
See GpGp
for information about covariance
functions.
vector of response values
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
.
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
.
n1 <- 20
n2 <- 20
n <- n1*n2
locs <- as.matrix( expand.grid( (1:n1)/n1, (1:n2)/n2 ) )
covparms <- c(2, 0.2, 0.75, 0)
y <- fast_Gp_sim(covparms, "matern_isotropic", locs, 50 )
ord <- order_maxmin(locs)
NNarray <- find_ordered_nn(locs,20)
#loglik <- vecchia_meanzero_loglik( covparms, "matern_isotropic", y, locs, NNarray )
Run the code above in your browser using DataLab