Description Usage Arguments Value Examples
View source: R/make-Q-alpha_2d.R
A function for setting up a conditional autoregressive (CAR) or simultaneous autoregressive (SAR) precision matrix for use as a prior in Bayesian models
1 | make_Q_alpha_2d(n_dims, phi, use_spam = TRUE, prec_model = "CAR")
|
n_dims |
is a vector of length M that are the dimensions of the CAR/SAR matrix at each resolution |
phi |
is a vector of length M with each element between -1 and 1 that defines the strength of the autoregressive process. Typically this will be set to 1 for use as a prior in penalized Bayesian models |
use_spam |
is a boolean flag to determine whether the output is a list of spam matrix objects ( |
prec_model |
is a string that takes the values "CAR" or "SAR" and defines the graphical structure for the precision matrix. |
a list of n x n sparse spam matrices or Matrix matrices of class "dgCMatrix" (see Matrix package for details)
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.