Description Usage Arguments Details Value Examples
Calculates various metrics measuring the number of distinct medications consumed daily for every individual of the study cohort over the study period and provides cohort descriptive statistics on those metrics.
1 2 3 4 5 6 7 8 | ind_simult(
processed_tab,
individual_stats = c("mean", "min", "median", "max"),
stats = c("mean", "sd", "min", "p5", "p10", "p25", "median", "p75", "p90", "p95",
"max"),
calendar = FALSE,
cores = parallel::detectCores()
)
|
processed_tab |
Table of individual drug treatments over the study period. Created by |
individual_stats |
Descriptive statistics of daily consumption over the study period to calculate for every individual. See Details for possible values. |
stats |
Cohort descriptive statistics to calculate on the polypharmacy indicator. See Details for possible values. |
calendar |
|
cores |
The number of CPU cores to use. See |
individual_stats & 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'
.
list
:
indic
: data.table
indicating each stats
(columns) for each individual_stats
(rows).
stats_id
: data.table
indicating each individual_stats
for each individuals (all cohort).
min_conso
: data.table
indicating each stats
for the number of days where an individual consume at least X
drugs.
calendar
: If calendar=TRUE
, data.table
indicating the number of drugs consumed for each day (only for individuals who has at least 1 day with 1 drug consumption).
1 2 3 4 5 6 7 8 9 10 11 12 13 | rx1 <- data.frame(id = c(1, 1, 2),
code = c("A", "B", "A"),
date = c("2000-01-01", "2000-01-04", "2000-01-08"),
duration = c(5, 7, 5))
cohort1 <- data.frame(id = as.numeric(1:3),
age = c(45, 12, 89),
sex = c("F", "F", "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-15",
cores = 1)
dt_ind_simult <- ind_simult(rx_proc1, calendar = TRUE, cores = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.