Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about chapter 8.9 Variable Importance Analysis with OIT #27

Open
juandavidgutier opened this issue Jan 6, 2023 · 2 comments
Open

Comments

@juandavidgutier
Copy link

Hello @imalenica,

I am new in tlverse and Dynamic and Optimal Individualized Treatment Regimes. However, I have a question about Variable Importance Analysis with OIT, particularly, I want to know, how to interpret the list of mean outcomes under the optimal individualized treatment (i.e. vim_results), when I modify your example, to include two categorical covariates in your dataset.

Here is the code for two categorical variables

`
#two categorical variables to compare the importance
data$W1<-ifelse(data$W1<quantile(data$W1)[2],1,ifelse(data$W1<quantile(data$W1)[3],2,3))
data$W2<-ifelse(data$W1<quantile(data$W1)[3],1,ifelse(data$W1<quantile(data$W1)[1],2,3))

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

tmle_spec_vim <- tmle3_mopttx_vim(
V=c("W3", "W4"),
type = "blip2",
learners = learner_list,
maximize = FALSE,
method = "SL",
complex = TRUE,
realistic = FALSE,
contrast = "linear"
)

vim_results2 <- tmle3_vim(tmle_spec_vim, data, node_list, learner_list,
adjust_for_other_A = TRUE
)

View(vim_results2)`

I get the next values in the list vim_results2:
with A = W2, psi_tranformed = -0.25093618
with A = W1, psi_tranfomed = 0.08352115
with A = A, psi_tranformed = 0.01225883

Does it mean that W2 is most important than W1? and why?

@imalenica
Copy link
Member

Thank you for this question! I hope I can clarify a bit better here.

It looks like you are trying to minimize the mean under the OIT in this example, so the smaller the psi_transformed is, the better. Assume we are able to intervene on W2 and find the OIT for W2 (while controlling for all pre-treatment variables). Then, OIT for W2 would result in the smallest mean outcome of Y under OIT for W2. Similarly, we can pretend that we can intervene on W1 as well, and do the same. But the OIT for W1 results in a greater mean under the OIT for W1 then for W2, and we want it to be as small as possible. Hence, W2, or more accurately the OIT for W2, is "more important" as an intervention variable than A and W1. This, of course, doesn't take into account if W2 is a plausible intervention, or the time-ordering of variables, which we should be careful about.

@juandavidgutier
Copy link
Author

Hello @imalenica,

Thanks a lot for your answer and for the clear explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants