set_cp_cubic: set_cp_cubic

Description Usage Arguments Value

View source: R/set_cp_function.R

Description

Set a change point and fit a cubic model on data prior to the change point to obtian expected SSD visits/calculate misses

Usage

1
2
3
4
5
6
7
8
set_cp_cubic(
  data,
  var_name = "n_miss_visits",
  return_miss_only = FALSE,
  return_eval_only = FALSE,
  week_period = FALSE,
  specify_cp = NULL
)

Arguments

data

A dataframe output by count_prior_events_truven

var_name

A character string of outcome for which to apply analysis

return_miss_only

Logical to only return miss information

return_eval_only

Logical to only return model evaluation criteria info

week_period

Logical to incorporate a "day of the week" effect into model. Note this is only sensible for one-day period aggregation.

specify_cp

A postive integer value for the specific change point you want to use. The value represents 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)

Value

A list containing miss information, changepoint information, predictions, the model itself, and a plot of the middle finger curve and model


aarmiller/delayDX documentation built on July 11, 2021, 4:01 p.m.