eval_make_formula {causalPAF} | R Documentation |
Evaluates and Makes Formula for regression of exposure or risk factor or outcome on its parents in a causal Bayesian network directed acyclic graph.
Description
Evaluates and Makes Formula for regression of exposure or risk factor or outcome on its parents in a causal Bayesian network directed acyclic graph. Given a causal Bayesian network, directed acyclic graph (DAG) where arrows representing
causal dependencies between confounders, risk factors, exposure and disease, together with a sensible probability distribution on
the graph that respects these causal dependencies. To consistently estimate causal effects that risk factors may have on each
other and on disease, we need to make a strong no unmeasured confounding assumption: that is common causes of nodes in the graph,
which may be causes of two risk factors or a cause of risk factor and disease, are also included as nodes in the graph.
Causal Bayesian networks have a local Markov property that the conditional probability distribution of any node X_j
, given values
for the other variables in the network, only depends on the values x_{pa_{j}}
of the parent nodes.
Usage
eval_make_formula(data, in_out, model_list, w, addCustom = FALSE, custom = "")
Arguments
data |
A wide format data containing all the risk factors, confounders, exposures and outcomes within the causal DAG Bayesian network. |
in_out |
This defines the causal directed acyclic graph (DAG). A list of length |
model_list |
is a list of models fitted for each of the variables in in_outArg[[2]] (or in_outArg |
w |
Column of weights for case control matching listing in same order as patients in data. |
addCustom |
Logical TRUE or FALSE indicating whether a customised interaction term is to be added to the each regression. The interaction term can include splines. |
custom |
text containing the customised interaction term to be added to each regression. The text should be enclosed in inverted commas. Splines can be included within the interaction terms. See tutorial for examples. |
Value
model_listReturn[[1]] model list A
model_listReturn[[2]] model list B
model_listReturn[[3]] model list C
model_listReturn[[4]] model list D
model_listReturn[[5]] model list E
model_listReturn[[6]] model list F
model_listReturn[[7]] model list G
model_listReturn[[8]] model list H
model_listReturn[[9]] model list I
model_listReturn[[10]] model list J
model_listReturn[[11]] model list K