diff --git a/R/pcalg.R b/R/pcalg.R index 623a150..8b77260 100644 --- a/R/pcalg.R +++ b/R/pcalg.R @@ -176,7 +176,7 @@ rmvDAG <- colnames(errMat) <- nodes(dag) # == colnames(weightMatrix) ## compute X matrix X_i - if (sum(weightMatrix) > 0) { + if (sum(abs(weightMatrix)) > 0) { X <- errMat for (j in 2:p) { ## uses X[*, 1:(j-1)] -- "recursively" ! ij <- 1:(j-1)