acceptreject_DAG {BCDAG} R Documentation

## Accept/reject the proposed DAG given the current DAG (internal function)

### Description

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.

### Usage

acceptreject_DAG(
tXX,
n,
currentDAG,
proposedDAG,
node,
op.type,
a,
U,
w,
current.opcard,
proposed.opcard
)


### Arguments

 tXX (q,q) matrix X'X with X the (n,q) data matrix n number of observations (rows) in the data matrix X currentDAG (q,q) adjacency matrix of current DAG proposedDAG (q,q) adjacency matrix of proposed DAG node nodes u and v involved in the modified edge u -> v op.type the type of operator applied to currentDAG to obtain proposedDAG 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 currentDAG proposed.opcard number of direct successors of proposedDAG

### Value

A Boolean indicating whether proposedDAG has been accepted (TRUE) or not (FALSE)

[Package BCDAG version 1.0.0 Index]