Skip to contents

Make 2x2xk contingency tables from summarized adam data. This function is NOT generalized

Usage

make_two_by_two_by_k_(
  dat,
  event_index,
  strata_var,
  treatment_var,
  treatment_refval,
  subjectid_var
)

Arguments

dat

data.table. The analysis data set.

event_index

vector of integers that index the rows in dat that match the definition of an 'event'. Matching is done via the INDEX_ column in dat.

strata_var

character. Variable in dat to stratify by specific for this call.

treatment_var

character. The name of the treatment variable in dat.

treatment_refval

character. The reference value of the treatment variable in dat.

subjectid_var

character. Name of the subject identifier variable in dat (default is "USUBJID").

Value

A two-by-two-by-k array where k represents the number of subgroups (strata).