This class inherits from sl3_Task. In addition to all the
methods supported by sl3_Task, it supports the following.
make_tmle3_Task(...)
| ... | Passes all arguments to the constructor. See documentation for the Constructor below. |
|---|
R6Class object.
tmle3_Task object
make_tmle3_task(data, npsem, ...)
dataA data.frame or data.table containing the underlying data
npsemA list of tmle3_Node objects, where each is created using define_node. These specify the NPSEM. See examples.
...Other arguments passed to the constructor of sl3_Task. NB: Support for these is currently limited.
get_tmle_node(node_name, bound = FALSE)Gets the data associated with a tmle_node. Bounds the data if requested.
node_name: character, the name of the node to get.
bound: logical, if true the data is transformed to be in (0,1) based on pre-specified bounds.
get_regression_task(target_node, bound = FALSE)Gets a sl3_Task suitable for fitting the conditional likelihood factor with the target_node
as the outcome.
target_node: character, the name of the node to get.
generate_counterfacutal_task(uuid, new_data)Generates a new tmle_Task where some nodes are overridden to have counterfactual values.
uuid: A unique identifier for the counterfactual task, as generated by UUIDgenerate
new_data: A data.frame or data.table with the counterfactual values. Column names must refer to node names in the npsem for this task.
npsemThe list of tmle3_Node objects specifying the NPSEM