indirect_PAF_Sjolander_onesimulation {causalPAF} | R Documentation |
Calculation of Population Attributable Fraction (PAF), with a decomposition of the total PAF into direct
and indirect components. It performs one simulation which can be combined with a bootstrap approach to
perform multiple simulations. If we think of Y_0
as the potential outcome for
an individual if they were never exposed to the risk factor, can be directly interpreted as the relative change in
disease prevalence if an exposure was absent from the population.
Sjolander introduced the ideas of mediation into the literature for PAF, defining a decomposition of the total PAF
into direct and indirect components: and
options: width=100 alt="Causal Bayesian network DAG"
indirect_PAF_Sjolander_onesimulation(
data_frame,
exposure,
mediator,
response,
mediator_model,
response_model,
response_model_2,
weights
)
data_frame |
Data frame containing the data. The data frame has cases in rows and variables in columns. |
exposure |
The exposure name in the form of character string e.g. “phys” for physical exercise. |
mediator |
The mediator name in the form of character string e.g. “whr” for waist hip ratio. |
response |
The outcome name in the form of character string e.g. “case” for a stroke case. |
mediator_model |
A list containing each of the fitted mediator regression models e.g.
|
response_model |
is a regression for the outcome on all mediators together with all parents and confounders of the mediators in a Markov causal Bayesian network DAG e.g. |
response_model_2 |
is a regression for the outcome on the exposure together with all parents and confounders of the exposure in a Markov causal Bayesian network DAG along with other risk factors at the same level of the causal Bayesian network DAG. E.G. If physical exercise (“exer”) in the example given in the diagram is the exposure. Then the regression would include all parents of “exer” (i.e. sex, region, educ, age) as well as risk factors at the same level of the causal Bayesian network (i.e. stress, smoke, diet, alcoh). |
weights |
A numeric n x |
totalPAF |
total PAF |
directPAF |
direct PAF |
indirectPAF |
indirect PAF |