I am unable to locate documentation on whether tmle3 can handle user-specified propensity scores or how to fit a propensity score model within tmle3 prior to fitting the outcome model. What I can gather from the Handbook (https://tlverse.org/tlverse-handbook/tmle3.html#tmle), tmle3 fits a propensity score model implicitly, based on the user-defined structural causal model.
If it does fit a propensity score implicitly, it seems as tmle3 is struggling with handling high-dimensional data. We are in a setting where we are using text for causal inference, and thus we using a high-dimensional sparse document-term matrix (10 000 cases and 130 000 covariates). When I fit this model (takes about 6 h), along the lines of the code below (I am happy to provide the simulated data if you wish to experiment), the average treatment effect is way off. The simulated ATE is 5.5 but tmle3 is producing an ATE of -128.
Any ideas of how to proceed?
`
4. "Moderate cleaning", with text controls ----
tdm <- imf.tdm.moderate.cleaning.df
gather tabular data
mf.meta1 <- imf.meta
imf.meta2 <- cbind(imf.meta1, tdm)
imf.meta contains "C1", "C2", "C3" tabular data and the TDM
nodes <- list(W = c("C1", "C2", "C3", names(tdm)),
A = "T",
Y = "Y")
lrnr_glm_fast <- make_learner(Lrnr_glm_fast)
lrnr_mean <- make_learner(Lrnr_mean)
learner_list <- list(Y = lrnr_mean, A = lrnr_glm_fast)
make a new copy to deal with data.table weirdness
imf.meta3 <- data.table::copy(imf.meta2)
estimate
start_time <- Sys.time()
tmle_fit_from_spec <- tmle3(tmle_TSM_all(), imf.meta3, nodes, learner_list)
end_time <- Sys.time()
end_time - start_time
`
I am unable to locate documentation on whether tmle3 can handle user-specified propensity scores or how to fit a propensity score model within tmle3 prior to fitting the outcome model. What I can gather from the Handbook (https://tlverse.org/tlverse-handbook/tmle3.html#tmle), tmle3 fits a propensity score model implicitly, based on the user-defined structural causal model.
If it does fit a propensity score implicitly, it seems as tmle3 is struggling with handling high-dimensional data. We are in a setting where we are using text for causal inference, and thus we using a high-dimensional sparse document-term matrix (10 000 cases and 130 000 covariates). When I fit this model (takes about 6 h), along the lines of the code below (I am happy to provide the simulated data if you wish to experiment), the average treatment effect is way off. The simulated ATE is 5.5 but tmle3 is producing an ATE of -128.
Any ideas of how to proceed?
`
4. "Moderate cleaning", with text controls ----
tdm <- imf.tdm.moderate.cleaning.df
gather tabular data
mf.meta1 <- imf.meta
imf.meta2 <- cbind(imf.meta1, tdm)
imf.meta contains "C1", "C2", "C3" tabular data and the TDM
nodes <- list(W = c("C1", "C2", "C3", names(tdm)),
A = "T",
Y = "Y")
lrnr_glm_fast <- make_learner(Lrnr_glm_fast)
lrnr_mean <- make_learner(Lrnr_mean)
learner_list <- list(Y = lrnr_mean, A = lrnr_glm_fast)
make a new copy to deal with data.table weirdness
imf.meta3 <- data.table::copy(imf.meta2)
estimate
start_time <- Sys.time()
tmle_fit_from_spec <- tmle3(tmle_TSM_all(), imf.meta3, nodes, learner_list)
end_time <- Sys.time()
end_time - start_time
`