Learn R Programming

CIMTx (version 0.3.0)

tmle: Targeted maximum likelihood (TMLE)

Description

This function implements the TMLE method. Please use our main function causal_multi_treat.R.

Usage

tmle(y, trt, x, ...)

Arguments

y

numeric vector for the binary outcome

trt

numeric vector for the treatment indicator

x

data frame containing the treatment indicator and covariates

...

Other arguments

Examples

Run this code
# NOT RUN {
library(CIMTx)
set.seed(3242019)
idata = data_gen(n = 120, ratio =1,scenario = 1)
trt_ind <- as.numeric(idata$trtdat$trt_ind)
all_vars <- idata$trtdat[, -1] #exclude treatment indicator
y <- idata$Yobs
x = idata$trtdat
causal_multi_treat(y = y, x = idata$trtdat, trt = trt_ind,SL.library = c("SL.glm"),
method = "IPTW-Logistics", estimand = "ATE")
# }

Run the code above in your browser using DataLab