tmle3_Spec_mopttx_vim: Variable Importance with the Mean Under the Optimal...

tmle3_Spec_mopttx_vimR Documentation

Variable Importance with the Mean Under the Optimal Individualized Rule

Description

The functions contained in the class define a Variable Importance metric for the TMLE of the Mean Under the Optimal Individualized Rule with Categorical Treatment, learned and estimated under Revere CV-TMLE. For learning the Optimal Rule, see 'Optimal_Rule_Revere' class.

Format

An R6Class object inheriting from tmle3_Spec.

Value

A tmle3 object inheriting from tmle3_Spec with methods for obtaining the Variable Importance metric for the TMLE of the Mean Under the Optimal Individualized Rule. For a full list of the available functionality, see the complete documentation of tmle3_Spec.

Parameters

- V: User-specified list of covariates used to define the rule. - type: Blip type, corresponding to different ways of defining the reference category in learning the blip; mostly applies to categorical treatment. Available categories include "blip1" (reference level of treatment), "blip2" (average level of treatment) and "blip3" (weighted average level of treatment). - method: Either "SL" (for the TMLE estimate) or "Q" (for Q-learning). - learners: List of user-defined learners for relevant parts of the likelihood. - contrast: Defined either a "linear" or "multiplicative" contrast for the delta method. - maximize: Should the average outcome be maximized of minimized? Default is maximize=TRUE. - complex: If TRUE, the returned mean under the Optimal Rule is based on the full set of covariates provided by the user (parameter "V"). If FALSE, simpler rules (including the static rules), are evaluated as well; the returned mean under the Optimal Rule is then a potentially more parsimonious rule, if the mean performance is similar. - realistic: If TRUE, the optimal rule returned takes into account the probability of treatment given covariates. - resource: Indicates the percent of initially estimated individuals who should be given treatment that get treatment, based on their blip estimate. If resource = 1 all estimated individuals to benefit from treatment get treatment, if resource = 0 none get treatment.

Super classes

tmle3::tmle3_Spec -> tmle3mopttx::tmle3_Spec_mopttx_blip_revere -> tmle3_Spec_mopttx_vim

Methods

Public methods

Inherited methods

Method new()

Usage
tmle3_Spec_mopttx_vim$new(
  V = NULL,
  type = "blip2",
  method = "SL",
  learners = NULL,
  contrast = "linear",
  maximize = TRUE,
  complex = TRUE,
  realistic = FALSE,
  resource = 1,
  reference = NULL,
  ...
)

Method vals_from_factor()

Usage
tmle3_Spec_mopttx_vim$vals_from_factor(x)

Method make_tmle_task()

Usage
tmle3_Spec_mopttx_vim$make_tmle_task(data, node_list, ...)

Method set_opt()

Usage
tmle3_Spec_mopttx_vim$set_opt(opt)

Method make_params()

Usage
tmle3_Spec_mopttx_vim$make_params(tmle_task, likelihood)

Method clone()

The objects of this class are cloneable with this method.

Usage
tmle3_Spec_mopttx_vim$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

## Not run: 
library(sl3)
library(tmle3)
library(data.table)

data("data_cat_vim")
data <- data_cat_vim
data$A <- as.integer(data$A)

lrn1 <- Lrnr_mean$new()
lrn2 <- Lrnr_glm_fast$new()
lrn3 <- Lrnr_glmnet$new()

Q_learner <- Lrnr_sl$new(learners = list(lrn1, lrn2, lrn3),
metalearner = Lrnr_nnls$new()
)

mn_metalearner <- make_learner(Lrnr_solnp,
loss_function = loss_loglik_multinomial,
learner_function = metalearner_linear_multinomial
)
g_learner <- make_learner(Lrnr_sl, list(lrn1, lrn3), 
mn_metalearner)

b_learner <- create_mv_learners(learners = list(lrn1, lrn2))

learner_list <- list(Y = Q_learner, A = g_learner, B = b_learner)

node_list <- list(W = c("W2", "W3", "W4"), 
A = c("A", "W1"), Y = "Y")

tmle_spec <- tmle3_mopttx_vim(
V = "W3", learners = learner_list, type = "blip2",
contrast = "multiplicative", maximize = FALSE,
method = "SL", complex = TRUE, realistic = FALSE
)

## End(Not run)

tlverse/tmle3mopttx documentation built on Aug. 9, 2022, 3:31 p.m.