ind_stdcontinuous: Assess polypharmacy based on the number of medications that...

Description Usage Arguments Details Value Examples

View source: R/ind_stdcontinuous.R

Description

Calculates the number of distinct medications that are consumed both during the initial and the final period of the overall study period by every individual of the study cohort and provides cohort descriptive statistics on this indicator.

Usage

1
2
3
4
5
6
ind_stdcontinuous(
  processed_tab,
  pdays,
  stats = c("mean", "sd", "min", "p5", "p10", "p25", "median", "p75", "p90", "p95",
    "max")
)

Arguments

processed_tab

Table of individual drug treatments over the study period. Created by data_process function.

pdays

Duration (in days) of the initial and final periods of time . The initial period = [min; min+pdays] and the final period = [max-pdays; max], where min and max are the study_start and study_end arguments. See data_process.

stats

Cohort descriptive statistics to calculate on the polypharmacy indicator. See Details for possible values.

Details

stats: Possible values are

Value

list:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
rx1 <- data.frame(id = c(1, 1, 1, 2, 3),
                  code = c("A", "A", "B", "A", "A"),
                  date = c("2000-01-01", "2000-01-22", "2000-01-10", "2000-01-01", "2000-01-20"),
                  duration = c(10, 10, 22, 31, 12))
cohort1 <- data.frame(id = as.numeric(1:4),
                      age = c(45, 12, 89, 31),
                      sex = c("F", "F", "M", "M"))
rx_proc1 <- data_process(Rx_deliv = rx1, Rx_id = "id", Rx_drug_code = "code",
                         Rx_drug_deliv = "date", Rx_deliv_dur = "duration",
                         Cohort = cohort1, Cohort_id = "id",
                         study_start = "2000-01-01", study_end = "2000-01-31",
                         cores = 1)
dt_ind_stdcontinuous <- ind_stdcontinuous(processed_tab = rx_proc1, pdays = 10)

polypharmacy documentation built on July 12, 2021, 5:08 p.m.