Takes the inputs for a Gaussian graphical model and bundles them into
one object, ready for prior elicitation with elicit_prior.
Arguments
- K
A
pbypsymmetric positive-definite precision matrix, .- G
A
pbypsymmetric 0/1 adjacency matrix with zero diagonal.- nu
Prior study size (degrees of freedom).
- mu
Mean vector of length
p. The defaultNULLcorresponds to the centered (zero-mean) case that all current methods assume. Supplying a non-NULLmuis not yet supported.- pip
Prior inclusion probabilities. The default
NULLcorresponds to the uniform prior. Can be a single probability or apbypsymmetric matrix with zero diagonal.
Examples
p <- 3
G <- matrix(0, p, p)
G[1, 2] <- G[2, 1] <- 1 # single edge, 1-2
K <- diag(p)
K[1, 2] <- K[2, 1] <- 0.3
params <- ggm_parameters(K = K, G = G, nu = 10)
params
#> <ggm_parameters>
#> nodes : 3
#> edges : 1 of 3
#> nu : 10 (prior study size)
# with prior inclusion probabilities (needed for BSDA planning later)
params_pip <- ggm_parameters(K = K, G = G, nu = 10, pip = 0.7)