# \donttest{
library(survey)
library(caret)
library(dplyr)
data_A <- df_svy_A
data_B <- df_svy_B
# Get predictor variables from data_model
x_predictors <- data_A %>% select(5:19) %>% names()
# Run projection_randomforest with bias correction
rf_proj_corrected <- projection_randomforest(
data_model = data_A,
target_column = "Y",
predictor_cols = x_predictors,
data_proj = data_B,
domain1 = "province",
domain2 = "regency",
psu = "num",
ssu = NULL,
strata = NULL,
weights = "weight",
feature_selection = TRUE,
bias_correction = TRUE)
rf_proj_corrected$Direct
rf_proj_corrected$Domain1_corrected_bias
rf_proj_corrected$Domain2_corrected_bias
# }
Run the code above in your browser using DataLab