# \donttest{
data(newws)
modmed.results = modmed(data = newws, treatment = "treat", mediator = "emp",
outcome = "depression", covariates.disc = c("emp_prior", "nevmar",
"hispanic", "nohsdip"), covariates.cont = c("workpref", "attitude",
"depress_prior"), moderators.disc = "CHCNT", moderators.cont = "ADCPC",
m.model = list(intercept = c("ADCPC", "CHCNT"), treatment = c("ADCPC",
"CHCNT"), emp_prior = NULL, nevmar = NULL, hispanic = NULL,
nohsdip = NULL, workpref = NULL, attitude = NULL, depress_prior = NULL),
y.model = list(intercept = c("ADCPC", "CHCNT"), treatment = c("ADCPC",
"CHCNT"), mediator = c("ADCPC", "CHCNT"), tm = c("ADCPC",
"CHCNT"), emp_prior = NULL, nevmar = NULL, hispanic = NULL,
nohsdip = NULL, workpref = NULL, attitude = NULL, depress_prior = NULL),
comp.mod.disc.values = 3, ref.mod.disc.values = 2, comp.mod.cont.values = 5050,
ref.mod.cont.values = 5050, m.scale = "binary", y.scale = "continuous")
sens.results = modmed.sens(modmed.results, sens.effect = "TIE.ref",
U.scale = "binary", grid.b.m = 2, grid.b.y = 2, iter = 2, nsim = 2,
ncore = 1)
sens.results = modmed.sens(modmed.results, sens.effect = "TIE.ref",
U.scale = "binary", t.model = list(intercept = c("ADCPC", "CHCNT"),
emp_prior = "ADCPC", nevmar = "CHCNT", hispanic = NULL, nohsdip = NULL,
workpref = NULL, attitude = NULL, depress_prior = NULL), grid.b.m = 2,
grid.b.y = 2, iter = 2, nsim = 2, ncore = 1)
# }
Run the code above in your browser using DataLab