This class inherits from sl3_Task. In addition to all the methods supported by sl3_Task, it supports the following.

tmle3_Task

make_tmle3_Task(...)

Arguments

...

Passes all arguments to the constructor. See documentation for the Constructor below.

Format

R6Class object.

Value

tmle3_Task object

Constructor

make_tmle3_task(data, npsem, ...)

data

A data.frame or data.table containing the underlying data

npsem

A 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.

Methods

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.

Fields

npsem

The list of tmle3_Node objects specifying the NPSEM