modelp: Estimating a graph corresponding to a posterior probability threshold
Description
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.
Usage
modelp(MCMCchain, p, pdag = FALSE, burnin = 0.2)
Value
a square matrix with dimensions equal to the number of variables representing the adjacency matrix of the directed graph summarising the sample of DAGs
Arguments
MCMCchain
object of class partitionMCMC, orderMCMC or iterativeMCMC, representing the output of structure sampling function partitionMCMC or orderMCMC (the latter when parameter chainout=TRUE;
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 0 and 1, indicates the percentage of the samples which will be the discarded as `burn-in' of the MCMC chain; the rest of the samples will be used to calculate the posterior probabilities; 0.2 by default