# \donttest{
set.seed(112)
m_d <- generate_syn_data(sample_size = 100)
m_xgboost <- function(nthread = 1,
ntrees = 35,
shrinkage = 0.3,
max_depth = 5,
...) {SuperLearner::SL.xgboost(
nthread = nthread,
ntrees = ntrees,
shrinkage=shrinkage,
max_depth=max_depth,
...)}
data_with_gps <- estimate_gps(.data = m_d,
.formula = w ~ cf1 + cf2 + cf3 +
cf4 + cf5 + cf6,
gps_density = "normal",
sl_lib = c("m_xgboost")
)
pd <- compile_pseudo_pop(data_obj = data_with_gps,
ci_appr = "matching",
gps_density = "normal",
bin_seq = NULL,
exposure_col_name = c("w"),
nthread = 1,
dist_measure = "l1",
covar_bl_method = 'absolute',
covar_bl_trs = 0.1,
covar_bl_trs_type= "mean",
delta_n = 0.5,
scale = 1)
# }
Run the code above in your browser using DataLab