reduce_data: Preprocessing Step to Rolling Entry Matching

Description Usage Arguments Value Examples

View source: R/reduce_data.R

Description

Preprocessing Step to Rolling Entry Matching

Usage

1
reduce_data(data, treat, tm, entry, id, lookback = 1)

Arguments

data

Original dataset before reduce_data() was ran.

treat

String for name of treatment variable in data.

tm

String for time period indicator variable name in data.

entry

String for name of time period in which the participant enrolled in the intervention (in the same units as the tm variable).

id

String for individual id variable name in data.

lookback

The number of time periods to look back before the time period of enrollment (1-...).

Value

reduced_data returns a dataset of reduced data ready for propensity scoring and to use in the function score_data()

Examples

1
2
3
4
5
data(package="rollmatch", "rem_synthdata_small")
reduced_data <- reduce_data(data = rem_synthdata_small, treat = "treat",
                            tm = "quarter", entry = "entry_q",
                            id = "indiv_id", lookback = 1)
reduced_data

rollmatch documentation built on July 8, 2020, 6:56 p.m.