Function detecting duration outliers for a particular activity

detect_duration_outliers(activitylog, ..., details, filter_condition)

Arguments

activitylog

The activity log

...

for each activity to be checked, an argument "activity_name" = duration_within(...) to define bounds. See ?duration_within

details

Boolean indicating wheter details of the results need to be shown

filter_condition

Condition that is used to extract a subset of the activity log prior to the application of the function

Value

activitylog containing the rows of the original activity log for which activity duration outliers are detected Information on the presence of activity duration outliers

See also

Examples

# \donttest{ data("hospital_actlog") detect_duration_outliers(activitylog = hospital_actlog, Treatment = duration_within(bound_sd = 1))
#> *** OUTPUT ***
#> Outliers are detected for following activities
#> Treatment Lower bound: 5.06 Upper bound: 22.2
#> A total of 1 is detected (1.89% of the activity executions)
#> For the following activity instances, outliers are detected:
#> # A tibble: 1 x 13 #> patient_visit_nr activity originator start complete #> <dbl> <chr> <chr> <dttm> <dttm> #> 1 523 Treatme~ Nurse 17 2017-11-21 18:26:04 2017-11-21 18:55:00 #> # ... with 8 more variables: triagecode <dbl>, specialization <chr>, #> # duration <dbl>, mean <dbl>, sd <dbl>, bound_sd <dbl>, lower_bound <dbl>, #> # upper_bound <dbl>
# }