a_window: Define the Time Window

Description Usage Arguments Value Examples

View source: R/adt_private.R

Description

For most data, the time windows are calculated from the baseline time (left window = the midpoint between current and the previous time point; right window = the midpoint between current and the next time point). If the time windows are longer than the maximum acceptable length, then force to select biomarker within the maximum window length we set. For the first and last baseline time, since there is no "previous" or "next" time point availiable, use the maximum acceptable window length instead.

Usage

1
a_window(dat, v_date, window, window_overlap, v_id = "subject_id")

Arguments

dat

The baseline time dataset.

v_date

A string indicating the date name of the baseline time.

window

An integer (unit of days) indicating the maximum acceptable gap time for merging a biomarker test to base data. Default is 730 days. For most data, the time windows are calculated from the baseline time (left window = the midpoint between current and the previous time point; right window = the midpoint between current and the next time point). If the time windows are longer than the maximum acceptable length, then force to select biomarkers within the maximum window length we set. For the first and last baseline time, since there is no "previous" or "next" time point available, use the maximum acceptable window length instead.

window_overlap

A logical value indicating the time window setting. Default "False." If true, all time windows will set from 1/2 "window" days before the baseline time to the 1/2 "window" days after baseline. In this case, the time windows may overlap, which means some biomarkers may be merged into multiple baseline data. If false, the windows will be calculated from the baseline times. The left window is set to be the midpoint between the current and the previous time point. The right window is set to be the midpoint between the current and the next time point. For the first and last baseline time, since there is no "previous" or "next" time point available, use the maximum acceptable window length (set by the parameter "window") instead.

v_id

A string indicating the id name of baseline dateset. Default is "subject_id" (may varied if using customized column names dictionary).

Value

A dataset with time window for biomarkers

Examples

1
2
3
4
## Not run: 
a_window(dat, v_date, window, window_overlap, v_id = "subject_id")

## End(Not run)

olssol/ADTool documentation built on Feb. 12, 2021, 3:49 a.m.