Elicit a prior for GGM parameters
Usage
# S3 method for class 'ggm_parameters'
elicit_prior(params, prior = NULL, ...)Arguments
- params
A
ggm_parametersobject, as returned byggm_parameters. It also inherits frombgm_parameters.- prior
Character scalar naming the precision prior, or
NULL(default) to infer it from the graph:"wishart"for a completeG,"gwishart"for a sparseG. Supplyingprioroverrides the default and is validated against the graph (e.g. a sparse-only prior cannot be placed on a complete graph).- ...
Family-specific arguments.
Value
A bgm_elicited object describing the elicited prior. It also
carries a family-specific class (for example ggm_elicited), on which
the downstream methods dispatch.
Details
The elicitation currently applies the K/nu centering,
which is exact for Wishart, and approximate for G-Wishart.
See also
elicit_prior() for the generic method and prior_ess()
for prior ESS estimation.
Other prior elicitation:
elicit_prior(),
ggm_study(),
simulate_prior_study(),
simulate_prior_study.ggm_study()
Examples
p <- 3
G <- matrix(0, p, p)
G[1, 2] <- G[2, 1] <- 1
K <- diag(p)
K[1, 2] <- K[2, 1] <- 0.3
params <- ggm_parameters(K = K, G = G, nu = 10)
ep <- elicit_prior(params)
ep
#> <ggm_elicited> prior: gwishart
#> nodes : 3
#> edges : 1 of 3
#> nu : 10 (prior study size)