n_rct <- 500; n_rwd <- 500
var_name <- c("x1","x2","x3","x4","x5","x6")
p_success_rct <- c(0.7,0.9,0.2,0.3,0.2,0.3)
p_success_rwd <- c(0.2,0.2,0.8,0.8,0.7,0.8)
tau <- "6*x2+x6+2"
y0 <- "x1"
log.ps <- "x1*x2+x3*x4+5*x5+x6"
rho1 <- c("x1","x2",0)
rho2 <- c("x2","x3",0)
target.data <- RCTrep::DGM(trial=TRUE, n_rct, var_name,
p_success_rct, tau, y0, log.ps=0,
binary = FALSE, noise=1, rho1, rho2)
source.data <- RCTrep::DGM(trial=FALSE, n_rwd, var_name,
p_success_rwd, tau, y0, log.ps,
binary = FALSE, noise=1, rho1, rho2)
Run the code above in your browser using DataLab