Skip to contents

Takes the inputs for a Gaussian graphical model and bundles them into one object, ready for prior elicitation with elicit_prior.

Usage

ggm_parameters(K, G, nu, mu = NULL, pip = NULL)

Arguments

K

A p by p symmetric positive-definite precision matrix, .

G

A p by p symmetric 0/1 adjacency matrix with zero diagonal.

nu

Prior study size (degrees of freedom).

mu

Mean vector of length p. The default NULL corresponds to the centered (zero-mean) case that all current methods assume. Supplying a non-NULL mu is not yet supported.

pip

Prior inclusion probabilities. The default NULL corresponds to the uniform prior. Can be a single probability or a p by p symmetric matrix with zero diagonal.

Value

A ggm_parameters object, which also inherits from bgm_parameters.

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)