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 |
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 |
|
simult_ind_stats |
|
simult_calendar |
|
stdcumul_nPeriod |
|
cores |
The number of CPU cores to use when executing |
Details
stats & simult_ind_stats: Possible values are
-
'mean'
,'min'
,'median'
,'max'
,'sd'
; -
'pX'
where X is an integer value in ]0, 100]; -
'q1'
='p25'
,'q2'
='p50'
='median'
,q3
='p75'
.
method: Possible values are
-
'ind_simult'
to assess polypharmacy based on the daily simultaneous consumption of medication. -
'ind_stdcumul
to assess polypharmacy based on the cumulative number of distinct medications consumed over a given period of time (i.e. the standard definition). -
'ind_wcumul'
to assess polypharmacy based on the cumulative number of distinct medication consumed over a given period of time, weighted by the duration of consumption of each medication. -
'ind_stdcontinuous'
to assess polypharmacy based on the number of medications that are consumed both during the initial and the final period of the study period. -
'ind_ucontinuous'
to assess polypharmacy based on the uninterrupted consumption of distinct medications over the study period.
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
)