build_model: Run a fit on a given dataset

Description Usage Arguments Examples

Description

The dataset should have one more column than the predictors and response. This additional column, which is typically a date or day number, has to be named "date" or "day"

Usage

1
2
3
4
build_model(c0, history_window, penalty_factor = 15, start = 10,
  initial_expiry_data = c(0, 0), initial_collection_data = c(60, 60,
  60), data, date_column = "day|date", response_column = "plt_used",
  show_progress = TRUE)

Arguments

c0

the c0 value

history_window

Number of days to look back

penalty_factor

penalty for shortage specified by doctors

start

the day the model is evaluated??. Default 10

initial_expiry_data

the number of units expiring in an day and the day after, a 2-length vector

initial_collection_data

is the number of units that will be collected for the first three days when the prediction begins

data

the dataset

date_column

the name of the date or day number column as a regex, default is "day|date" i.e. day or date

response_column

the name of the response column, default is "plt_used"

show_progress

a TRUE/FALSE flag for showing progress, default TRUE

Examples

1
2
3
4
5
6
7
build_model(c0 = 30,
           history_window = 200,
           penalty_factor = 15,
           start = 10,
           response_column = "plt.used",
           data = day3_data,
           show_progress = FALSE)

bnaras/pip documentation built on May 5, 2019, 6:54 p.m.