reduce_data {rollmatch} | R Documentation |
Preprocessing Step to Rolling Entry Matching
Description
Preprocessing Step to Rolling Entry Matching
Usage
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
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
[Package rollmatch version 2.0.3 Index]