static_binary_on: Turn All Treatment Nodes On

View source: R/shift.R

static_binary_onR Documentation

Turn All Treatment Nodes On

Description

A pre-packaged shift function for use with provided estimators when the exposure is binary. Used to estimate the population intervention effect when all treatment variables are set to 1.

Usage

static_binary_on(data, trt)

Arguments

data

A dataframe containing the treatment variables.

trt

The name of the current treatment variable.

Value

A dataframe with all treatment nodes set to 1.

See Also

lmtp_tmle(), lmtp_sdr(), lmtp_sub(), lmtp_ipw()

Examples


data("iptwExWide", package = "twang")
a <- paste0("tx", 1:3)
baseline <- c("gender", "age")
tv <- list(c("use0"), c("use1"), c("use2"))
lmtp_sdr(iptwExWide, a, "outcome", baseline = baseline, time_vary = tv,
         shift = static_binary_on, outcome_type = "continuous", folds = 2)


lmtp documentation built on July 26, 2023, 5:33 p.m.