data(SimDag6)
Corr=dataSim6$SimCorr[[1]]
nobs=50
q=ncol(Corr)
Gt=dataSim6$TDag
M_q=FBF_LS(Corr, nobs, matrix(0,q,q), 0, 0.01, 1000)
G_med=M_q
G_med[M_q>=0.5]=1
G_med[M_q<0.5]=0 #median probability DAG
#Structural Hamming Distance between the true DAG and the median probability DAG
sum(sum(abs(G_med-Gt)))
Run the code above in your browser using DataLab