indicators {polypharmacy}R Documentation

Provide several polypharmacy indicators at once

Description

Wrapper function to run sequentially various polypharmacy functions on a single set of data. Each function corresponds to a different definition of polypharmacy.

Usage

indicators(
  processed_tab,
  stats = c("mean", "sd", "min", "p5", "p10", "p25", "median", "p75", "p90", "p95",
    "max"),
  method = c("ind_simult", "ind_stdcumul", "ind_wcumul", "ind_stdcontinuous",
    "ind_ucontinuous"),
  stdconti_pdays = 90,
  simult_ind_stats = c("mean", "min", "median", "max"),
  simult_calendar = FALSE,
  stdcumul_nPeriod = c(1, 3),
  cores = parallel::detectCores()
)

Arguments

processed_tab

Name of the table of individual drug treatments to analyze. Created by the data_process function.

stats

Polypharmacy cohort descriptive statistics to calculate on every polypharmacy indicator requested. See Details for possible values.

method

Names of the functions corresponding to each of the polypharmacy indicators to be calculated.. See Details for possible values.

stdconti_pdays

pdays argument of the ind_stdcontinuous function. Can contain multiple values. See examples.

simult_ind_stats

stats argument of the ind_simult function.

simult_calendar

TRUE or FALSE. calendar argument of the ind_simult function.

stdcumul_nPeriod

nPeriod argument of the ind_stdcumul function. Can contain multiple values. See examples.

cores

The number of CPU cores to use when executing ind_simult. See detectCores.

Details

stats & simult_ind_stats: Possible values are

method: Possible values are

Value

list of the values returned by every function listed in the method argument.

Examples


dt_indic <- indicators(
  processed_tab = sample_Rx_processed,
  stats = c('mean', 'sd', 'min', 'p5', 'p10', 'p25', 'median', 'p75', 'p90', 'p95', 'max'),
  method = c('ind_simult', 'ind_stdcumul', 'ind_wcumul', 'ind_stdcontinuous', 'ind_ucontinuous'),
  stdconti_pdays = c(30, 90),
  simult_ind_stats = c('mean', 'min', 'median', 'max'),
  simult_calendar = TRUE,
  stdcumul_nPeriod = c(1, 3),
  cores = 1
)


[Package polypharmacy version 1.0.0 Index]