do_sim_sequentialPAF {causalPAF} | R Documentation |
A fitted model for a mediator or exposure or risk factor can be simulated given values of the other risk
factors or exposure saved in the data frame current_mat
. This allows for potential outcomes to be measured for
causal analysis. For example, for an outcome Y_{A,M}
with exposure A and mediators M_{1}, M_{3}, \dots M_{K}
the function can measure potential outcomes such as Y_{A=0,M_{1},M_{2},M_{3}}
or Y_{A=0,M_{1},M_{2}=0,M_{3}=0}
when there are three mediators.
The model can be either a binary, continuous or an ordered factor response model.
do_sim_sequentialPAF(colnum, current_mat, model)
colnum |
Column number of exposure or risk factor of interest within the data frame. The data frame has cases in rows and variables in columns. |
current_mat |
The data frame containing the data for which the model can be simulated with. For
potential outcomes for example such as |
model |
A fitted causal regression model for either a binary, continuous or an ordered factor response. |
simulation |
simulation |
## Not run:
# I don't want you to run this
## End(Not run)