filter_treated: Extract the "legitimate" subset of patients who were treated

Description Usage Arguments Value

View source: R/filter_treated.R

Description

In many scenarios, it is useful to extract the subset of patients who received treatment. However, for several patients, there exist multiple recordings in phase 'A' or 'E', respectively. The function filter_treated finds the "closest" A recording to the first E recording within the boundary of tolerance days. Since the treatment was 7 days long, the function considers the A recording that is closest to 7 days before the E recording (in case there are multiple A recordings for the same patient).

Usage

1
filter_treated(df, tolerance = 14L)

Arguments

df

The charite data.

tolerance

The tolerable maximum number of days between an A recording and its corresponding E recording.

Value

The filtered charitedataset. Each patient has exactly 1 A and 1 E recording.


unmnn/charitemisc documentation built on Dec. 17, 2020, 9:28 a.m.