[R] question regarding rmvDAG in package pcalg
Jack Luo
jluo.rhelp at gmail.com
Tue Nov 25 17:36:32 CET 2014
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]]
More information about the R-help
mailing list