dataframe with which has limited the claims to a specific window
Arguments
dat
dataset
id_dat
dataset with our other identifying variables, this should be 1 row per person
id
ID variable which will be used to match and merge
id_date
name of the date of interest from the identification dataset, for example a date of diagnosis
claims_date
name for the variable in the claims data (dat) which is the date of the claim
time_pre
number to limit how many days, pre diagnosis, should be included. Default will be
infinity (all claims)
time_post
similar to time_pre, but this will be after the date of interest
Details
This function takes prepared data, using the 'prepare_data' function, along with an identification dataset to limit
the claims of interest to a specific time window.