View source: R/f_dose_observed.R
f_dose_observed | R Documentation |
Provides an overview of the observed drug dispensing data, including the summary of cumulative dispensed doses, bar chart of the gap time between randomization and the first drug dispensing visit, the gap time between two consecutive drug dispensing visits, and the dispensed doses at drug dispensing visits by drug.
f_dose_observed(df = NULL, visitview = NULL, showplot = TRUE)
df |
A data frame for subject-level enrollment and event data,
including the following variables:
|
visitview |
A data frame containing the observed drug dispensing
data, including the following variables:
|
showplot |
A Boolean variable that controls whether or not to
show the drug dispensing model fit and drug demand prediction
plots. It defaults to |
A list with the following components:
trialsdt
: The trial start date.
cutoffdt
: The cutoff date.
vf
: A data frame for subject-level drug dispensing data,
including the following variables:
drug
, drug_name
, kit
, kit_name
,
usubjid
, treatment
, treatment_description
,
arrivalTime
, time
, event
, dropout
,
day
, dose
, cum_dose
, and row_id
.
treatment_by_drug_df
: A data frame indicating the treatments
associated with each drug, including the following variables:
treatment
and drug
.
kit_description_df
: A data frame indicating the
drug and kit descriptions, including the following variables:
drug
, drug_name
, kit
, and kit_name
.
dosing_summary_t
: A data frame for the cumulative doses
dispensed by each observed time point. It contains the following
variables:
kit
, kit_name
, t
, n
,
lower
, upper
, mean
, and var
, where
lower
and upper
have missing values,
mean = n
, and var = 0
.
dosing_summary_t0
: A data frame for the cumulative doses
dispensed before the cutoff date. It contains the following
variables:
kit
, kit_name
, and cum_dose_t0
.
cum_dispense_plot
: The step plot for the cumulative doses
dispensed for each kit type.
bar_t0_plot
: The bar chart for the gap time between
randomization and the first drug dispensing visit.
bar_ti_plot
: The bar chart for the gap time between two
consecutive drug dispensing visits.
bar_di_plot
: The bar chart for the dispensed doses at drug
dispensing visits.
Kaifeng Lu, kaifenglu@gmail.com
observed <- f_dose_observed(df = df2, visitview = visitview2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.