View source: R/cgeneric_kronecker.R
| multi_generic_model | R Documentation |
cgeneric or rgeneric modelsConstructs a multiple kronecker product model from a list of model
objects. The resulting model contains a corresponding inlabru::bm_multi()
mapper. This can be used as an alternative to a binary tree of kronecker
product models.
multi_generic_model(models, ...)
models |
A list of |
... |
Arguments passed on to every |
The last model in the list has the slowest index variation, and the
first model has the fastest index variation. This matches the latent
variable ordering of standard INLA:f() model components with
(main, group, replicate).
A 'cgeneric' or 'rgeneric' model object, containing a
multi-kronecker product model, with a corresponding inlabru::bm_multi()
mapper.
R1 <- Matrix(crossprod(diff(diag(4))))
m1 <- cgeneric("generic0", R = R1, param = c(1, NA),
scale = FALSE, useINLAprecomp = FALSE)
R2 <- Matrix(crossprod(diff(diag(3))))
m2 <- cgeneric("generic0", R = R2, param = c(1, NA),
scale = FALSE, useINLAprecomp = FALSE)
m3 <- cgeneric("iid", n = 2, param = c(1, 0.5),
useINLAprecomp = FALSE)
multi123 <- multi_generic_model(
list(m1 = m1, m2 = m2, m3 = m3),
useINLAprecomp = FALSE
)
prec(multi123, theta = 0.0)
if(!is.na(packageCheck("inlabru", "2.13.0.9005"))) {
print(multi123$mapper)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.