osofr / simcausal

Simulating Longitudinal and Network Data with Causal Inference Applications
64 stars 11 forks source link

using as.integer() in node formulas prints to the terminal: #2

Open osofr opened 9 years ago

osofr commented 9 years ago

using as.integer() in node formulas prints it to the terminal:

library(simcausal)
D <- DAG.empty()
D <- D +
         node("Trexp", distr = "rexp", rate = 1) +
         node("Cweib", distr = "rweibull", shape = 0.5, scale = 1) +
         node("T", distr = "rconst", const = as.integer(Trexp*100))
setD <- set.DAG(D)
dat <- sim(setD, n=100)