set_cp_exp: set_cp_exp

View source: R/cp_functions.R

set_cp_expR Documentation

set_cp_exp

Description

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

Usage

set_cp_exp(
  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/delaySim documentation built on Jan. 2, 2023, 11:23 p.m.