Learn R Programming

TrialEmulation (version 0.0.4.2)

expand_until_switch: Check Expand Flag After Treatment Switch

Description

Check if patients have switched treatment in eligible trials and set expand = 0.

Usage

expand_until_switch(s, n)

Value

Vector of indicator values up until first switch.

Arguments

s

numeric vector where 1 indicates a treatment switch in that period

n

length of s