-
Notifications
You must be signed in to change notification settings - Fork 6
Description
After install the package, I use the following code in the latest document to get a matched dataset, but after running it, I get no output. My code is as the following.
1. generalize the data
set.seed(291)
n <- 100
mydata <- generate_syn_data(sample_size=100)
year <- sample(x=c("2001","2002","2003","2004","2005"),size = n,
replace = TRUE)
region <- sample(x=c("North", "South", "East", "West"),size = n,
replace = TRUE)
mydata$year <- as.factor(year)
mydata$region <- as.factor(region)
mydata$cf5 <- as.factor(mydata$cf5)
cor_val <- absolute_corr_fun(mydata[,2], mydata[, 3:length(mydata)])
2. generate GPS
data_with_gps <- estimate_gps(.data = mydata,
.formula = w ~ cf1 + cf2 + cf3 +
cf4 + cf5 + cf6,
gps_density = "normal",
sl_lib = c("SL.xgboost")
)
3. compile the matched data
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
)