frontier_member_flags: Per-Subject Membership Matrix for Pareto Frontier Members

View source: R/frontier_member_flags.R

frontier_member_flagsR Documentation

Per-Subject Membership Matrix for Pareto Frontier Members

Description

For each candidate subgroup on fs$grp.consistency$out_sg$pareto_frontier, returns a binary indicator (one row per subject in fs$df.est, one column per frontier member) marking which subjects belong to that subgroup.

Usage

frontier_member_flags(fs)

Arguments

fs

A forestsearch result object.

Details

This lets the user compute downstream quantities the frontier table does not surface directly: per-frontier-member sample sizes by covariate stratum, set comparisons between frontier members ("which subjects are in the selected subgroup but not on the runner-up?"), and survival summaries by frontier member.

Value

A list with three elements:

flags

Integer matrix of dimension n_subjects x n_frontier_members, with 1 = subject in subgroup, 0 = not.

member_labels

Character vector of length n_frontier_members, each entry the "cut1 & cut2 & ..." definition of that frontier member.

is_selected

Logical vector of length n_frontier_members, marking which member is the selected subgroup.

See Also

pareto_frontier_table, compute_frontier_cis, plot_pareto_frontier.

Examples

## Not run: 
fmf <- frontier_member_flags(fs)
# How many subjects in each frontier member?
colSums(fmf$flags)
# Which subjects are unique to the selected subgroup?
sel <- which(fmf$is_selected)
rowSums(fmf$flags) == 1L & fmf$flags[, sel] == 1L

## End(Not run)


forestsearch documentation built on Nov. 15, 2026, 9:06 a.m.