Hi, I am trying to use rmvDAG in pcalg package to generate data from DAG structure. One thing I found is that when the number of variables gets large, there can be really large numbers in the data matrix. I played around with different parameters and it looks like the same case.
library(pcalg) > p = 20 > n = 100 > rDAG <- randomDAG(p, prob = 0.2, lB=0.1, uB=1) > d.normMat <- rmvDAG(n, rDAG, errDist="normal") > max(d.normMat) [1] 5.763518 > p = 200 > n = 100 > rDAG <- randomDAG(p, prob = 0.2, lB=0.1, uB=1) > d.normMat <- rmvDAG(n, rDAG, errDist="normal") > max(d.normMat) [1] 365099508 > p = 2000 > n = 100 > rDAG <- randomDAG(p, prob = 0.2, lB=0.1, uB=1) > d.normMat <- rmvDAG(n, rDAG, errDist="normal") > max(d.normMat) [1] 3.880373e+90 Did anyone know how to fix this? Thanks a lot! -Jack [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.