powered by
Identifies the optimal subgroup according to the specified criterion
select_best_subgroup(values, sg.criterion, dmin.grf, n.max)
Data frame row with best subgroup or NULL if none found
Data frame. Node metrics from policy trees
Character. "mDiff" for maximum difference, "Nsg" for largest size
Numeric. Minimum difference threshold
Integer. Maximum allowed subgroup size (total sample size)
vals <- data.frame(diff = c(8.5, 6.2, 3.1), Nsg = c(120, 95, 80)) select_best_subgroup(values = vals, sg.criterion = "mDiff", dmin.grf = 6, n.max = 500)
Run the code above in your browser using DataLab