Get YaMastar used in NDE and NIE caculation
YaMastar.SamplePred(
a,
astar,
e.m = NULL,
e.y,
fit.m,
fit.y,
X.predict.M,
X.predict.Y,
sel,
seed,
K
)
exposure variables at current level
exposure variables at counterfactual level
effect modifier for the mediator variable
effect modifier for the outcome variable
model fit regressing mediator on exposures and confounders on mediator
model fit regressing outcome on exposures, effect modifiers, mediator and confounders on outcome
counfounders for mediator
counfounders for outcome
a vector selecting which iterations of the fit should be retained or inference
the random seed to use to evaluate the code
number of samples to generate for each MCMC iteration
A vector containing the sample prediction for YaMastar