View source: R/performanceassess.R
modelp | R Documentation |
This function constructs a directed graph (not necessarily acyclic) including all edges with a posterior probability above a certain threshold. The posterior probability is evaluated as the Monte Carlo estimate from a sample of DAGs obtained via an MCMC scheme.
modelp(MCMCchain, p, pdag = FALSE, burnin = 0.2)
MCMCchain |
object of class |
p |
threshold such that only edges with a higher posterior probability will be retained in the directed graph summarising the sample of DAGs |
pdag |
logical, if TRUE (FALSE by default) all DAGs in the MCMCchain are first converted to equivalence class (CPDAG) before the averaging |
burnin |
number between |
a square matrix with dimensions equal to the number of variables representing the adjacency matrix of the directed graph summarising the sample of DAGs
Polina Suter
Bostonscore<-scoreparameters("bge", Boston)
## Not run:
partfit<-sampleBN(Bostonscore, "partition")
hdag<-modelp(partfit, p=0.9)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.