create_mortality_outcomes: Creat New Enrollee Mortality Outcomes

Description Usage Arguments Value

View source: R/create_mortality_outcomes.R

Description

create_mortality_outcomes() is a function that makes indicators for both cumulative mortality and mortality hazard for the new enrollee sample.

Usage

1
2
3
4
5
6
7
create_mortality_outcomes(
  DT_deaths,
  DT_id = "pde_benes",
  start_day = 0,
  int = 30,
  int_num = 12
)

Arguments

DT_deaths

data.table with bene_id, and from_days (days from specified starting point until death)

DT_id

data table with bene_id

start_day

integer (default = 0), when to start counting outcomes from

int

integer (default = 30), length of mortality intervals

int_num

interger (default = 12), number of intervals to iterate through

Value

a data.table with the following colums:

bene_id
mort_X

Indicator for mortality from start day to X days, e.g. mort_30

mort_X_Y

Indicator for mortality between X and Y days, e.g. mort_30_60


evanjflack/polypharmacy documentation built on Oct. 12, 2020, 10:45 a.m.