| get_select_params | R Documentation |
Extract Parameter Grid for Selected Configurations
get_select_params(x, smd_group = NULL)
x |
A |
smd_group |
Optional character vector of SMD groups
(e.g. |
A data.frame with the parameter combinations corresponding to the selected configurations.
# Define formula and set up optimization
formula_cancer <- formula(status ~ age * sex)
opt_args <- make_opt_args(cancer, formula_cancer, gps_method = "m1")
withr::with_seed(8252, {
opt_results <- optimize_gps(
data = cancer,
formula = formula_cancer,
opt_args = opt_args,
n_iter = 2000
)
})
# Select optimal combinations prioritizing SMD balance and matching in key
# groups
select_results <- select_opt(
x = opt_results,
smd_groups = list(
c("adenoma", "control"),
c("control", "crc_benign"),
c("crc_malignant", "control")
),
smd_variables = "age",
smd_type = "max",
perc_matched = c("adenoma", "crc_malignant")
)
# Extract the parameter grid from select_results for smd_group = "0.05-0.10"
get_select_params(select_results, smd_group = "0.05-0.10")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.