Description Usage Arguments Details Value Examples
Instead of replacing missing stop dates, we impute the durations and then infer the stop dates from there.
1 2 3 4 5 6 7 |
data |
A data frame containing columns |
method |
Method for imputing the values. See details. |
where |
Logical vector, or function applied to |
group |
Level of structure for imputation. Defaults to whole study population. |
... |
Extra arguments, currently ignored |
We can fix clashing start dates by setting group
to start_date
and patid
, i.e. average over groups with more than one member;
any metric should return the original values if the group size is one.
A data frame of the same structure as data
, with values imputed
1 2 | example_duration <- transform(example_therapy, duration = qty / ndd)
impute_duration(example_duration, method = 'mean', group = 'patid')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.