loo.glmmfields | R Documentation |
Extract the LOOIC (leave-one-out information criterion) using
loo::loo()
.
## S3 method for class 'glmmfields'
loo(x, ...)
x |
Output from |
... |
Arguments for |
set.seed(1)
s <- sim_glmmfields(n_draws = 12, n_knots = 12, gp_theta = 1.5,
gp_sigma = 0.2, sd_obs = 0.2)
# options(mc.cores = parallel::detectCores()) # for parallel processing
# save_log_lik defaults to FALSE to save space but is needed for loo():
m <- glmmfields(y ~ 0, time = "time",
lat = "lat", lon = "lon", data = s$dat,
nknots = 12, iter = 1000, chains = 4, seed = 1,
save_log_lik = TRUE)
loo(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.