Description Usage Arguments Value Examples
This function returns a grouped version (Guinness, 2018) of 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.
1 | vecchia_grouped_meanzero_loglik(covparms, covfun_name, y, locs, NNlist)
|
covparms |
A vector of covariance parameters appropriate for the specified covariance function |
covfun_name |
See |
y |
vector of response values |
locs |
matrix of locations. Row |
NNlist |
A neighbor list object, the output from |
a list containing
loglik
: the loglikelihood
1 2 3 4 5 6 7 8 9 10 | 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)
NNlist <- group_obs(NNarray)
#loglik <- vecchia_grouped_meanzero_loglik( covparms, "matern_isotropic", y, locs, NNlist )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.