acceptreject_DAG {BCDAG}  R Documentation 
This function computes the Metropolis Hastings acceptance rate for proposedDAG
given currentDAG
and the accepts/rejects proposedDAG
based on the Metropolis Hastings acceptance probability.
proposedDAG
is a direct successor of currentDAG
, which was obtained by applying an operator of type InsertD, DeleteD or ReverseD to currentDAG
.
The two DAGs only differ by one edge u > v
which has been inserted/deleted/reversed in currentDAG
.
acceptreject_DAG(
tXX,
n,
currentDAG,
proposedDAG,
node,
op.type,
a,
U,
w,
current.opcard,
proposed.opcard
)
tXX 

n 
number of observations (rows) in the data matrix 
currentDAG 

proposedDAG 

node 
nodes 
op.type 
the type of operator applied to 
a 
shape hyperparameter of the DAG Wishart prior 
U 
position hyperparameter of the DAG Wishart prior 
w 
prior probability of edge inclusion 
current.opcard 
number of direct successors of 
proposed.opcard 
number of direct successors of 
A Boolean indicating whether proposedDAG
has been accepted (TRUE
) or not (FALSE
)