Skip to contents

Includes every randomized participant in the originally assigned arm. Missing outcomes, adherence, and post-randomization events do not alter membership.

Usage

intentionToTreat(
  trial,
  participants,
  id_col = "id",
  arm_col = "arm",
  randomized_col = "randomized"
)

Arguments

trial

A Trial object.

participants

One row per source participant.

id_col, arm_col, randomized_col

Column names in participants.

Value

An analysis_set with included rows, member IDs, and explicit exclusions.

Examples

trial <- Trial("T1", c("active", "control"))
participants <- data.frame(
  id = c("p1", "p2", "screen"),
  arm = c("active", "control", NA),
  randomized = c(TRUE, TRUE, FALSE)
)
intentionToTreat(trial, participants)
#> <analysis_set> T1 ITT: 2 included, 1 excluded