Description Usage Arguments Value Examples
Find the change point in count data. This is a backwards-compatible wrapper function to find the changepoint, which calls other methods.
1 2 3 4 5 6 7 8 9 10 |
data |
A dataset of visit counts, output by count_prior_events_truven |
var_name |
The name of the count variable to find the change-point for |
method |
The method used to find changepoint. Options include "lm", "lm_quad", "lm_cube", "quad", "cube", "exp", "spline", "pettitt", "cusum", "MSE", "RMSE", "MAE", "MSLE", "RMSLE" |
eval_criteria |
The evaluation criteria used to find change points, if using a linear regression method |
return_miss_only |
Logical argument to only return the tibbles of miss visit counts |
week_period |
Logical to incorporate a "day of the week" effect into the linear mode. Note this is only sensible for one-day period aggregation |
specify_cp |
Set a specific change point you want to use instead of searching for optimal change point. Enter a postive integer value repersenting the days before the index on which you you want to specify the change point. (e.g. 100 would be 100 days before the index) |
auto_reg |
Logical that determines whether expected counts use a time-series framework that incorporates autoregression. Will automatically fit periodicity, automatically setting week_period to TRUE. Only relevant for cusum and pettitt methods |
A list containing tibbles of information about missed visits. These tibbles change depending on the method used, but all contain miss predictions and a plot
1 2 3 | cp_result_original <- final_time_map %>%
count_prior_events_truven(event_name = "any_ssd", start_day = 1, by_days = 1) %>%
find_change_point(var_name="n_miss_visits", method="lm_cube")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.