Skip to contents

Applies by_strata_by_trt and by_strata_across_trt functions to the endpoints data to determine eligibility for strata statistics. It adds a logical column to the data indicating whether each row meet the criteria.

Usage

apply_criterion_by_strata(
  ep,
  analysis_data_container,
  fn_map,
  type = c("by_strata_by_trt", "by_strata_across_trt")
)

Arguments

ep

A data.table containing endpoint data with applied endpoint criteria, typically the output from apply_criterion_endpoint.

analysis_data_container

data.table containing the analysis data.

fn_map

A data.table mapping endpoint definitions to by-strata criteria functions.

type

The type of criterion to apply, either "by_strata_by_trt" or "by_strata_across_trt".

Value

A data.table with one row per stratum for each endpoint, with an additional logical column indicating whether each row meets the criteria.