I'm not sure how to access to icate and ite...
As far as I can tell extract(model, type = "icate") and extract(model, type = "ite") don't return the individual treatment effects, they are constant across individuals in this MWE:
library(bartCause)
source(system.file("common", "friedmanData.R", package = "bartCause"))
testData <- generateFriedmanData(100, ranef = TRUE, causal = TRUE)
test.df <- with(testData, data.frame(x, y, z, g.1))
fit_sd <- bartc(y, z, X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9 + X10,
parametric = (1 | g.1), data = test.df,
verbose = FALSE, seed = 5,
commonSup.rule = "sd", commonSup.cut = 1, bart_args = list(keepTrees = TRUE))
refit_sd <- refit(fit_sd, commonSup.rule = "sd", commonSup.cut = 0.5)
extract(fit_sd, type = "icate")
Is the above code working as intended? And why?
If so, summary.bartcFit should produce the icate or ite for the CIs, is it possible to optionally output these as part of this function?
I'm not sure how to access to
icateandite...As far as I can tell
extract(model, type = "icate")andextract(model, type = "ite")don't return the individual treatment effects, they are constant across individuals in this MWE:Is the above code working as intended? And why?
If so,
summary.bartcFitshould produce theicateoritefor the CIs, is it possible to optionally output these as part of this function?